wpdesk / wp-wpdesk-rating-petition
1.6.2
2023-04-06 14:04 UTC
Requires
- php: >=7.0
- wpdesk/wp-notice: ^3.1
- wpdesk/wp-plugin-flow-common: ^1
Requires (Dev)
- 10up/wp_mock: *
- mockery/mockery: *
- phpunit/phpunit: <7
- squizlabs/php_codesniffer: ^3.0.2
- wimg/php-compatibility: ^8
- wp-coding-standards/wpcs: ^0.14.1
This package is auto-updated.
Last update: 2024-11-06 17:18:42 UTC
README
Rating Petition
A WordPress library which can be used to encourage the plugin users to review and rate it in WordPress repository.
Requirements
PHP 7.0 or later.
Installation via Composer
In order to install the bindings via Composer run the following command:
composer require wpdesk/wp-wpdesk-rating-petition
Example usage
To use it in the shipping zones area:
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();
}
To use it on the shipping method screen:
<?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();
}