Changeset 3356427
- Timestamp:
- 09/05/2025 04:46:18 AM (7 months ago)
- Location:
- transdirect-shipping
- Files:
-
- 10 edited
- 1 copied
-
tags/8.0.1 (copied) (copied from transdirect-shipping/trunk)
-
tags/8.0.1/includes/OrderSync.php (modified) (2 diffs)
-
tags/8.0.1/includes/ProductSync.php (modified) (1 diff)
-
tags/8.0.1/includes/TransdirectShipping.php (modified) (2 diffs)
-
tags/8.0.1/includes/TransdirectShippingTrait.php (modified) (1 diff)
-
tags/8.0.1/transdirect-shipping.php (modified) (4 diffs)
-
trunk/includes/OrderSync.php (modified) (2 diffs)
-
trunk/includes/ProductSync.php (modified) (1 diff)
-
trunk/includes/TransdirectShipping.php (modified) (2 diffs)
-
trunk/includes/TransdirectShippingTrait.php (modified) (1 diff)
-
trunk/transdirect-shipping.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
transdirect-shipping/tags/8.0.1/includes/OrderSync.php
r3347335 r3356427 239 239 { 240 240 $apiDetails = $this->td_get_api_details(true); 241 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on' ||$apiDetails->mode == 'no_display_mode')) {241 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on') || (isset($apiDetails->mode) && $apiDetails->mode == 'no_display_mode')) { 242 242 243 243 $filters = [ … … 338 338 $apiDetails = $this->td_get_api_details(true); 339 339 340 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on' ||$apiDetails->mode == 'no_display_mode')) {340 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on') || (isset($apiDetails->mode) && $apiDetails->mode == 'no_display_mode')) { 341 341 if (!wp_get_schedule('td_cron_order_sync')) { 342 342 wp_schedule_event(time(), '5mins', 'td_cron_order_sync'); -
transdirect-shipping/tags/8.0.1/includes/ProductSync.php
r3347335 r3356427 90 90 } 91 91 92 if ( count($data['products']) >= 10) {92 if (!empty($data['products']) && is_array($data['products']) && count($data['products']) >= 10) { 93 93 $this->send_to_api($data); 94 94 $data = []; -
transdirect-shipping/tags/8.0.1/includes/TransdirectShipping.php
r3347335 r3356427 126 126 $this->loader->add_filter('https_local_ssl_verify', $this, 'return_false'); 127 127 $this->loader->add_filter('https_ssl_verify', $this, 'return_false'); 128 $this->loader->add_filter('woocommerce_shipping_methods', $this, 'woocommerce_transdirect_shipping' );128 $this->loader->add_filter('woocommerce_shipping_methods', $this, 'woocommerce_transdirect_shipping', 10, 1); 129 129 } 130 130 … … 225 225 * The class responsible for transdirect's woocommerce shipping integration. 226 226 */ 227 public function woocommerce_transdirect_shipping( )227 public function woocommerce_transdirect_shipping($methods) 228 228 { 229 229 $methods['woocommerce_transdirect'] = WCTransdirectShipping::class; -
transdirect-shipping/tags/8.0.1/includes/TransdirectShippingTrait.php
r3347335 r3356427 19 19 if ($init) { 20 20 $settings = $this->get_instance_settings(); 21 $apiKey = $settings->api_key;22 $timeout = $settings->timeout;21 $apiKey = isset($settings->api_key) ? $settings->api_key : ''; 22 $timeout = isset($settings->timeout) ? $settings->timeout : 30; 23 23 $api_array['timeout'] = $timeout; 24 24 $args = $this->td_request_method_headers($apiKey, $api_array, 'GET'); -
transdirect-shipping/tags/8.0.1/transdirect-shipping.php
r3347335 r3356427 9 9 * 10 10 * @link https://transdirect.com.au/ 11 * @since 8.0. 011 * @since 8.0.1 12 12 * @package Transdirect_Shipping 13 13 * … … 16 16 * Plugin URI: https://www.transdirect.com.au/e-commerce/woo-commerce/ 17 17 * Description: This plugin allows you to calculate shipping as per your delivery location. 18 * Version: 8.0. 018 * Version: 8.0.1 19 19 * Author: Transdirect 20 20 * Author URI: https://transdirect.com.au/ … … 35 35 /** 36 36 * Currently plugin version. 37 * Start at version 8.0. 0and use SemVer - https://semver.org37 * Start at version 8.0.1 and use SemVer - https://semver.org 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define('TRANSDIRECT_SHIPPING_VERSION', '8.0. 0');40 define('TRANSDIRECT_SHIPPING_VERSION', '8.0.1'); 41 41 42 42 /** … … 233 233 * 234 234 */ 235 add_action('init', 'add_custom_shipping_zone_and_method');235 register_activation_hook(__FILE__, 'add_custom_shipping_zone_and_method'); 236 236 function add_custom_shipping_zone_and_method() { 237 237 if (!class_exists('WC_Shipping_Zones') || !class_exists('WC_Shipping_Zone')) { -
transdirect-shipping/trunk/includes/OrderSync.php
r3347335 r3356427 239 239 { 240 240 $apiDetails = $this->td_get_api_details(true); 241 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on' ||$apiDetails->mode == 'no_display_mode')) {241 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on') || (isset($apiDetails->mode) && $apiDetails->mode == 'no_display_mode')) { 242 242 243 243 $filters = [ … … 338 338 $apiDetails = $this->td_get_api_details(true); 339 339 340 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on' ||$apiDetails->mode == 'no_display_mode')) {340 if ((isset($apiDetails->enable_sync) && $apiDetails->enable_sync == 'on') || (isset($apiDetails->sync_all_order) && $apiDetails->sync_all_order == 'on') || (isset($apiDetails->mode) && $apiDetails->mode == 'no_display_mode')) { 341 341 if (!wp_get_schedule('td_cron_order_sync')) { 342 342 wp_schedule_event(time(), '5mins', 'td_cron_order_sync'); -
transdirect-shipping/trunk/includes/ProductSync.php
r3347335 r3356427 90 90 } 91 91 92 if ( count($data['products']) >= 10) {92 if (!empty($data['products']) && is_array($data['products']) && count($data['products']) >= 10) { 93 93 $this->send_to_api($data); 94 94 $data = []; -
transdirect-shipping/trunk/includes/TransdirectShipping.php
r3347335 r3356427 126 126 $this->loader->add_filter('https_local_ssl_verify', $this, 'return_false'); 127 127 $this->loader->add_filter('https_ssl_verify', $this, 'return_false'); 128 $this->loader->add_filter('woocommerce_shipping_methods', $this, 'woocommerce_transdirect_shipping' );128 $this->loader->add_filter('woocommerce_shipping_methods', $this, 'woocommerce_transdirect_shipping', 10, 1); 129 129 } 130 130 … … 225 225 * The class responsible for transdirect's woocommerce shipping integration. 226 226 */ 227 public function woocommerce_transdirect_shipping( )227 public function woocommerce_transdirect_shipping($methods) 228 228 { 229 229 $methods['woocommerce_transdirect'] = WCTransdirectShipping::class; -
transdirect-shipping/trunk/includes/TransdirectShippingTrait.php
r3347335 r3356427 19 19 if ($init) { 20 20 $settings = $this->get_instance_settings(); 21 $apiKey = $settings->api_key;22 $timeout = $settings->timeout;21 $apiKey = isset($settings->api_key) ? $settings->api_key : ''; 22 $timeout = isset($settings->timeout) ? $settings->timeout : 30; 23 23 $api_array['timeout'] = $timeout; 24 24 $args = $this->td_request_method_headers($apiKey, $api_array, 'GET'); -
transdirect-shipping/trunk/transdirect-shipping.php
r3347335 r3356427 9 9 * 10 10 * @link https://transdirect.com.au/ 11 * @since 8.0. 011 * @since 8.0.1 12 12 * @package Transdirect_Shipping 13 13 * … … 16 16 * Plugin URI: https://www.transdirect.com.au/e-commerce/woo-commerce/ 17 17 * Description: This plugin allows you to calculate shipping as per your delivery location. 18 * Version: 8.0. 018 * Version: 8.0.1 19 19 * Author: Transdirect 20 20 * Author URI: https://transdirect.com.au/ … … 35 35 /** 36 36 * Currently plugin version. 37 * Start at version 8.0. 0and use SemVer - https://semver.org37 * Start at version 8.0.1 and use SemVer - https://semver.org 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define('TRANSDIRECT_SHIPPING_VERSION', '8.0. 0');40 define('TRANSDIRECT_SHIPPING_VERSION', '8.0.1'); 41 41 42 42 /** … … 233 233 * 234 234 */ 235 add_action('init', 'add_custom_shipping_zone_and_method');235 register_activation_hook(__FILE__, 'add_custom_shipping_zone_and_method'); 236 236 function add_custom_shipping_zone_and_method() { 237 237 if (!class_exists('WC_Shipping_Zones') || !class_exists('WC_Shipping_Zone')) {
Note: See TracChangeset
for help on using the changeset viewer.