Plugin Directory

Changeset 2820918


Ignore:
Timestamp:
11/19/2022 04:36:13 PM (3 years ago)
Author:
wppunk
Message:

Release 1.5.4.3

Location:
shipping-nova-poshta-for-woocommerce/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • shipping-nova-poshta-for-woocommerce/trunk/readme.txt

    r2698030 r2820918  
    22Contributors: wppunk
    33Tags: нова пошта, nova poshta, новая почта, nova pochta, інтеграція нової пошти та інтернет-магазину, плагін нової пошти для wordpress
    4 Requires at least: 5.6
    5 Tested up to: 5.9
    6 Stable tag: 1.5.4.1
     4Requires at least: 5.8
     5Tested up to: 6.1
     6Stable tag: 1.5.4.3
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    8585== Changelog ==
    8686
     87= 1.5.4.3 =
     88* Added WordPress 6.1 compatibility
     89* Added PHP8.1 compatibility
     90* Added `shipping_nova_poshta_for_woocommerce_free_shipping` filter
     91* Added `shipping_nova_poshta_for_woocommerce_api_cities_limit` filter
     92* Minimal required WordPress version is 5.8
     93* Increased WordPress compatibility version
     94* Increased WooCommerce compatibility version
     95
    8796= 1.5.4.2 =
    8897* Fixed license check
  • shipping-nova-poshta-for-woocommerce/trunk/shipping-nova-poshta-for-woocommerce.php

    r2698030 r2820918  
    66 * Plugin URI:  http://wp-unit.com/
    77 * Description: Select a branch on the checkout page, the creation of electronic invoices, calculating shipping costs, COD payment, and much more ...
    8  * Version: 1.5.4.2
     8 * Version: 1.5.4.3
    99 * Author: WP Unit
    1010 * Author URI: http://wp-unit.com/
     
    1515 * @author  WP Punk
    1616 *
    17  * Requires at least: 5.6
     17 * Requires at least: 5.8
    1818 * Requires PHP: 7.0
    19  * WC requires at least: 3.3
    20  * WC tested up to: 6.3.1
     19 * WC requires at least: 4.6
     20 * WC tested up to: 7.1
    2121 */
    2222
  • shipping-nova-poshta-for-woocommerce/trunk/src/Api/Api.php

    r2679493 r2820918  
    9797     * @return array
    9898     */
    99     public function cities( string $search = '', int $limit = 10 ): array {
     99    public function cities( string $search = '', int $limit = 0 ): array {
    100100
    101101        if ( ! $this->settings->api_key() ) {
    102102            return [];
     103        }
     104
     105        if ( empty( $limit ) ) {
     106            $limit = (int) apply_filters( 'shipping_nova_poshta_for_woocommerce_api_cities_limit', 10 );
    103107        }
    104108
  • shipping-nova-poshta-for-woocommerce/trunk/src/Main.php

    r2698030 r2820918  
    3737     * Plugin version
    3838     */
    39     const VERSION = '1.5.4.2';
     39    const VERSION = '1.5.4.3';
    4040
    4141
  • shipping-nova-poshta-for-woocommerce/trunk/src/WooCommerce/Cart.php

    r2470822 r2820918  
    2323
    2424    /**
    25      * Plugin settings.
    26      *
    27      * @var Settings
    28      */
    29     private $settings;
    30 
    31     /**
    32      * Cart constructor.
    33      *
    34      * @param Settings $settings Settings.
    35      */
    36     public function __construct( Settings $settings ) {
    37 
    38         $this->settings = $settings;
    39     }
    40 
    41     /**
    4225     * Add hooks
    4326     */
     
    5639    public function cart_total( float $total ): float {
    5740
    58         $is_free = apply_filters( 'shipping_nova_poshta_for_woocommerce_free_shipping', $this->settings->exclude_shipping_from_total() );
     41        $shipping_methods = wc_get_chosen_shipping_method_ids();
     42        $shipping_method  = array_shift( $shipping_methods );
     43
     44        if ( empty( $shipping_method ) ) {
     45            return $total;
     46        }
     47
     48        $is_free = apply_filters( 'shipping_nova_poshta_for_woocommerce_free_shipping', false, $shipping_method );
    5949
    6050        if ( $is_free ) {
  • shipping-nova-poshta-for-woocommerce/trunk/templates/admin/page-options/license-form.php

    r2470822 r2820918  
    4141    </div>
    4242    <div>
    43         <input type="password" name="license_key" value="<?php echo esc_attr( $license_key ); ?>" <?php readonly( true, 'deactivate' === $method ); ?>>
     43        <input type="password" name="license_key" value="<?php echo esc_attr( $license_key ); ?>" <?php echo 'deactivate' === $method ? 'readonly' : ''; ?>>
    4444        <?php if ( 'activate' !== $method && ! $is_pro ) { ?>
    4545            <button
Note: See TracChangeset for help on using the changeset viewer.