[](https://gitlab.com/wpdesk/wp-wpdesk-rating-petition/pipelines) [](https://gitlab.com/wpdesk/wp-wpdesk-rating-petition/commits/master) [](https://packagist.org/packages/wpdesk/wp-wpdesk-rating-petition) [](https://packagist.org/packages/wpdesk/wp-wpdesk-rating-petition) [](https://packagist.org/packages/wpdesk/wp-wpdesk-rating-petition) WordPress Library to ask for good rate in repository. ==================================================== ## Requirements PHP 7.0 or later. ## Installation via Composer In order to install the bindings via Composer run the following command: ```bash composer require wpdesk/wp-wpdesk-rating-petition ``` ## Example usage ### When using in shipping zones: ```php 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(); } ``` ### When using in shipping method: ```php <?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(); } ```