Changeset 2940448
- Timestamp:
- 07/19/2023 03:36:24 PM (3 years ago)
- Location:
- shipping-nova-poshta-for-woocommerce/trunk
- Files:
-
- 5 edited
-
readme.txt (modified) (2 diffs)
-
shipping-nova-poshta-for-woocommerce.php (modified) (5 diffs)
-
src/Api/Api.php (modified) (2 diffs)
-
src/Education/WooCommerce/Payments/Gateways/COD.php (modified) (1 diff)
-
src/Education/WooCommerce/Shipping/Methods/Courier/Courier.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shipping-nova-poshta-for-woocommerce/trunk/readme.txt
r2915384 r2940448 4 4 Requires at least: 5.8 5 5 Tested up to: 6.2 6 Stable tag: 1.5. 56 Stable tag: 1.5.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 85 85 == Changelog == 86 86 87 = 1.5.6 = 88 * Improved cache for multilanguage sites 89 * Added compatibility with WooCommerce 7.9 90 87 91 = 1.5.5 = 88 92 * Improved search by cities -
shipping-nova-poshta-for-woocommerce/trunk/shipping-nova-poshta-for-woocommerce.php
r2915384 r2940448 6 6 * Plugin URI: http://wp-unit.com/ 7 7 * 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. 58 * Version: 1.5.6 9 9 * Author: WP Unit 10 10 * Author URI: http://wp-unit.com/ … … 18 18 * Requires PHP: 7.0 19 19 * WC requires at least: 4.6 20 * WC tested up to: 7. 720 * WC tested up to: 7.9 21 21 */ 22 22 … … 38 38 } 39 39 40 if ( defined( 'NOVA_POSHTA_PRO' ) ) { 41 add_action( 42 'admin_init', 43 static function () { 44 45 deactivate_plugins( plugin_basename( __FILE__ ) ); 46 } 47 ); 48 } 49 40 50 if ( ! function_exists( 'nova_poshta_load' ) ) { 41 51 /** … … 52 62 53 63 // 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', '<' ) ) { 55 65 $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' ); 56 66 } … … 66 76 add_action( 67 77 'admin_init', 68 function () {78 static function () { 69 79 70 80 deactivate_plugins( plugin_basename( __FILE__ ) ); -
shipping-nova-poshta-for-woocommerce/trunk/src/Api/Api.php
r2915384 r2940448 176 176 177 177 $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 ); 179 181 180 182 if ( $warehouses ) { … … 193 195 $this->db->update_warehouses( $warehouses ); 194 196 195 $field_name = 'ru' === $ this->language->get_current_language()? 'DescriptionRu' : 'Description';197 $field_name = 'ru' === $lang ? 'DescriptionRu' : 'Description'; 196 198 $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' ) ); 198 200 199 201 return $warehouses; -
shipping-nova-poshta-for-woocommerce/trunk/src/Education/WooCommerce/Payments/Gateways/COD.php
r2470841 r2940448 49 49 * @var array 50 50 */ 51 p rotected$enable_for_methods;51 public $enable_for_methods; 52 52 53 53 /** -
shipping-nova-poshta-for-woocommerce/trunk/src/Education/WooCommerce/Shipping/Methods/Courier/Courier.php
r2471834 r2940448 78 78 $this->method_title = esc_html__( 'Nova Poshta Courier Delivery (for Pro)', 'shipping-nova-poshta-for-woocommerce' ); 79 79 $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' ); 80 81 $this->enabled = 'no'; 81 82 $this->supports = [
Note: See TracChangeset
for help on using the changeset viewer.