Plugin Directory

Changeset 2940448


Ignore:
Timestamp:
07/19/2023 03:36:24 PM (3 years ago)
Author:
wppunk
Message:

Release 1.5.6

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

Legend:

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

    r2915384 r2940448  
    44Requires at least: 5.8
    55Tested up to: 6.2
    6 Stable tag: 1.5.5
     6Stable tag: 1.5.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    8585== Changelog ==
    8686
     87= 1.5.6 =
     88* Improved cache for multilanguage sites
     89* Added compatibility with WooCommerce 7.9
     90
    8791= 1.5.5 =
    8892* Improved search by cities
  • shipping-nova-poshta-for-woocommerce/trunk/shipping-nova-poshta-for-woocommerce.php

    r2915384 r2940448  
    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.5
     8 * Version: 1.5.6
    99 * Author: WP Unit
    1010 * Author URI: http://wp-unit.com/
     
    1818 * Requires PHP: 7.0
    1919 * WC requires at least: 4.6
    20  * WC tested up to: 7.7
     20 * WC tested up to: 7.9
    2121 */
    2222
     
    3838}
    3939
     40if ( defined( 'NOVA_POSHTA_PRO' ) ) {
     41    add_action(
     42        'admin_init',
     43        static function () {
     44
     45            deactivate_plugins( plugin_basename( __FILE__ ) );
     46        }
     47    );
     48}
     49
    4050if ( ! function_exists( 'nova_poshta_load' ) ) {
    4151    /**
     
    5262
    5363        // Check WooCommerce version.
    54         if ( ! function_exists( 'WC' ) || version_compare( WC()->version, '3.3', '<' ) ) {
     64        if ( ! function_exists( 'WC' ) || version_compare( WC()->version, '4.9', '<' ) ) {
    5565            $message = esc_html__( 'The Shipping for Nova Poshta plugin has been deactivated. Our plugin extends the WooCommerce plugin, but this plugin doesn\'t active.', 'shipping-nova-poshta-for-woocommerce' );
    5666        }
     
    6676            add_action(
    6777                'admin_init',
    68                 function () {
     78                static function () {
    6979
    7080                    deactivate_plugins( plugin_basename( __FILE__ ) );
  • shipping-nova-poshta-for-woocommerce/trunk/src/Api/Api.php

    r2915384 r2940448  
    176176
    177177        $cache      = $this->factory_cache->transient();
    178         $warehouses = $cache->get( 'warehouse-' . $city_id );
     178        $lang       = 'ru' === $this->language->get_current_language() ? 'ru' : 'ua';
     179        $cache_key  = 'warehouse-' . $lang . '-' . $city_id;
     180        $warehouses = $cache->get( $cache_key );
    179181
    180182        if ( $warehouses ) {
     
    193195        $this->db->update_warehouses( $warehouses );
    194196
    195         $field_name = 'ru' === $this->language->get_current_language() ? 'DescriptionRu' : 'Description';
     197        $field_name = 'ru' === $lang ? 'DescriptionRu' : 'Description';
    196198        $warehouses = wp_list_pluck( $warehouses, $field_name, 'Ref' );
    197         $cache->set( 'warehouse-' . $city_id, $warehouses, constant( 'DAY_IN_SECONDS' ) );
     199        $cache->set( $cache_key, $warehouses, constant( 'DAY_IN_SECONDS' ) );
    198200
    199201        return $warehouses;
  • shipping-nova-poshta-for-woocommerce/trunk/src/Education/WooCommerce/Payments/Gateways/COD.php

    r2470841 r2940448  
    4949     * @var array
    5050     */
    51     protected $enable_for_methods;
     51    public $enable_for_methods;
    5252
    5353    /**
  • shipping-nova-poshta-for-woocommerce/trunk/src/Education/WooCommerce/Shipping/Methods/Courier/Courier.php

    r2471834 r2940448  
    7878        $this->method_title       = esc_html__( 'Nova Poshta Courier Delivery (for Pro)', 'shipping-nova-poshta-for-woocommerce' );
    7979        $this->method_description = esc_html__( 'Allow your customers to deliver your products right to their door. Your customer needs to choose a city and fill in the address. Also, you can gift customers free delivery if their cart more than any exact price.', 'shipping-nova-poshta-for-woocommerce' );
     80        $this->label              = esc_html__( 'Fill the delivery address', 'shipping-nova-poshta-for-woocommerce' );
    8081        $this->enabled            = 'no';
    8182        $this->supports           = [
Note: See TracChangeset for help on using the changeset viewer.