Skip to content
Snippets Groups Projects
Select Git revision
  • 76b9f7e545b0cd43bb7f917969821c43a1d7ec46
  • master default protected
  • 1.6.4
  • 1.6.3
  • 1.6.2
  • 1.6.1
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.3.0-beta1
  • 1.2.1
  • 1.2.0
  • 1.2.0-beta5
  • 1.2.0-beta4
  • 1.2.0-beta3
  • 1.2.0-beta2
  • 1.2.0-beta1
  • 1.1.0
  • 1.0.0
21 results

README.md

Blame
  • pipeline status coverage report Latest Stable Version Total Downloads License

    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:

    composer require wpdesk/wp-wpdesk-rating-petition

    Example usage

    When using in shipping zones:

    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
    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();
    }