wpdesk/wp-wpdesk-rating-petition

1.6.2 2023-04-06 14:04 UTC

README

pipeline status coverage report Latest Stable Version Total Downloads License

评分请愿书

这是一个WordPress库,可以用来鼓励插件用户在WordPress仓库中对其进行评论和评分。

要求

PHP 7.0或更高版本。

通过Composer安装

为了通过Composer安装绑定,请运行以下命令

composer require wpdesk/wp-wpdesk-rating-petition

示例用法

在运费区域使用它

function init_repository_rating() {
    $time_tracker = new \WPDesk\RepositoryRating\TimeWatcher\ShippingMethodInstanceWatcher(
        FedexShippingService::UNIQUE_ID,
        'plugin_activation_flexible-shipping-fedex/flexible-shipping-fedex.php',
        '28-11-2019',
        FedexShippingMethod::class
    );
    $time_tracker->hooks();
    ( new \WPDesk\RepositoryRating\RatingPetitionNotice(
        $time_tracker,
        'flexible_shipping_fedex',
        $this->plugin_info->get_plugin_name(),
        'https://wpde.sk/fs-fedex-rate'
    ) )->hooks();
}

在运费方式屏幕上使用它

<?php
function init_repository_rating() {
    $time_tracker = new \WPDesk\RepositoryRating\TimeWatcher\ShippingMethodGlobalSettingsWatcher(
        'flexible_shipping_fedex'
    );
    $time_tracker->hooks();
    ( new \WPDesk\RepositoryRating\RatingPetitionNotice(
            $time_tracker,
            'flexible_shipping_fedex',
            $this->plugin_info->get_plugin_name(),
            'https://wpde.sk/fs-fedex-rate'
        )
    )->hooks();
}