Advanced Shipment Tracking for WooCommerce - Version 3.4.4

Version Description

  • Dev - tested with WooCommerce 6.6.1
  • Fix - Updated tracking email not sent
Download this release

Release Info

Developer zorem
Plugin Icon 128x128 Advanced Shipment Tracking for WooCommerce
Version 3.4.4
Comparing to
See all releases

Code changes from version 3.4.3 to 3.4.4

includes/api/class-wc-advanced-shipment-tracking-rest-api-controller.php CHANGED
@@ -62,10 +62,7 @@ class WC_Advanced_Shipment_Tracking_REST_API_Controller extends WC_REST_Controll
62
  'args' => array_merge( $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ), array(
63
  'tracking_number' => array(
64
  'required' => true,
65
- ),
66
- 'tracking_provider' => array(
67
- 'required' => true,
68
- ),
69
  ) ),
70
  ),
71
  'schema' => array( $this, 'get_public_item_schema' ),
62
  'args' => array_merge( $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ), array(
63
  'tracking_number' => array(
64
  'required' => true,
65
+ ),
 
 
 
66
  ) ),
67
  ),
68
  'schema' => array( $this, 'get_public_item_schema' ),
includes/class-wc-advanced-shipment-tracking-install.php CHANGED
@@ -61,7 +61,6 @@ class WC_Advanced_Shipment_Tracking_Install {
61
  add_action( 'update_ts_shipment_status_order_mete', array( $this, 'update_ts_shipment_status_order_mete' ) );
62
  add_action( 'wp_ajax_update_ts_shipment_status_order_mete', array( $this, 'update_ts_shipment_status_order_mete' ) );
63
  add_action( 'ast_insert_shipping_provider', array( $this, 'ast_insert_shipping_provider' ), 10, 1 );
64
- add_action( 'ast_insert_shipping_provider', array( $this, 'ast_insert_shipping_provider' ), 10, 1 );
65
  }
66
 
67
  /**
@@ -362,11 +361,11 @@ class WC_Advanced_Shipment_Tracking_Install {
362
 
363
  $default_shippment_providers = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %1s WHERE shipping_default = 1', $this->table ) );
364
  foreach ( $default_shippment_providers as $key => $val ) {
365
- $shippment_providers[ $val->provider_name ] = $val;
366
  }
367
 
368
  foreach ( $providers as $key => $val ) {
369
- $providers_name[ $val['provider_name'] ] = $val;
370
  }
371
 
372
  $n = 0;
@@ -379,13 +378,16 @@ class WC_Advanced_Shipment_Tracking_Install {
379
  $trackship_supported = $provider['trackship_supported'];
380
 
381
  if ( isset( $shippment_providers[ $ts_slug ] ) ) {
 
 
382
  $db_provider_url = $shippment_providers[$ts_slug]->provider_url;
383
  $db_shipping_country = $shippment_providers[$ts_slug]->shipping_country;
384
  $db_ts_slug = $shippment_providers[$ts_slug]->ts_slug;
385
  $db_trackship_supported = $shippment_providers[$ts_slug]->trackship_supported;
386
 
387
- if ( ( $db_provider_url != $provider_url ) || ( $db_shipping_country != $shipping_country ) || ( $db_ts_slug != $ts_slug ) || ( $db_trackship_supported != $trackship_supported ) ) {
388
  $data_array = array(
 
389
  'ts_slug' => $ts_slug,
390
  'provider_url' => $provider_url,
391
  'shipping_country' => $shipping_country,
61
  add_action( 'update_ts_shipment_status_order_mete', array( $this, 'update_ts_shipment_status_order_mete' ) );
62
  add_action( 'wp_ajax_update_ts_shipment_status_order_mete', array( $this, 'update_ts_shipment_status_order_mete' ) );
63
  add_action( 'ast_insert_shipping_provider', array( $this, 'ast_insert_shipping_provider' ), 10, 1 );
 
64
  }
65
 
66
  /**
361
 
362
  $default_shippment_providers = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %1s WHERE shipping_default = 1', $this->table ) );
363
  foreach ( $default_shippment_providers as $key => $val ) {
364
+ $shippment_providers[ $val->ts_slug ] = $val;
365
  }
366
 
367
  foreach ( $providers as $key => $val ) {
368
+ $providers_name[ $val['shipping_provider_slug'] ] = $val;
369
  }
370
 
371
  $n = 0;
378
  $trackship_supported = $provider['trackship_supported'];
379
 
380
  if ( isset( $shippment_providers[ $ts_slug ] ) ) {
381
+
382
+ $db_provider_name = $shippment_providers[ $ts_slug ]->provider_name;
383
  $db_provider_url = $shippment_providers[$ts_slug]->provider_url;
384
  $db_shipping_country = $shippment_providers[$ts_slug]->shipping_country;
385
  $db_ts_slug = $shippment_providers[$ts_slug]->ts_slug;
386
  $db_trackship_supported = $shippment_providers[$ts_slug]->trackship_supported;
387
 
388
+ if ( ( $db_provider_name != $provider_name ) || ( $db_provider_url != $provider_url ) || ( $db_shipping_country != $shipping_country ) || ( $db_ts_slug != $ts_slug ) || ( $db_trackship_supported != $trackship_supported ) ) {
389
  $data_array = array(
390
+ 'provider_name' => $provider_name,
391
  'ts_slug' => $ts_slug,
392
  'provider_url' => $provider_url,
393
  'shipping_country' => $shipping_country,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: WooCommerce, delivery, shipping, shipment tracking, tracking
4
  Requires at least: 5.3
5
  Tested up to: 6.0
6
  Requires PHP: 7.2
7
- Stable tag: 3.4.3
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -105,6 +105,10 @@ Yes, if you use external shipping services that work with the WooCommerce REST A
105
 
106
  == Changelog ==
107
 
 
 
 
 
108
  = 3.4.3 =
109
  * Fix - Change esc_html__ to esc_html for dynamic variable in plain tracking info email template
110
 
4
  Requires at least: 5.3
5
  Tested up to: 6.0
6
  Requires PHP: 7.2
7
+ Stable tag: 3.4.4
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
105
 
106
  == Changelog ==
107
 
108
+ = 3.4.4 =
109
+ * Dev - tested with WooCommerce 6.6.1
110
+ * Fix - Updated tracking email not sent
111
+
112
  = 3.4.3 =
113
  * Fix - Change esc_html__ to esc_html for dynamic variable in plain tracking info email template
114
 
templates/emails/customer-updated-tracking-order.php CHANGED
@@ -18,10 +18,11 @@
18
  if ( ! defined( 'ABSPATH' ) ) {
19
  exit;
20
  }
21
- $ut_settings = new wcast_updated_tracking_customizer_email();
22
  $ast = new WC_Advanced_Shipment_Tracking_Actions();
23
 
24
- $email_content = $ast->get_option_value_from_array( 'woocommerce_customer_updated_tracking_order_settings', 'wcast_updated_tracking_email_content', $ut_settings->defaults['wcast_updated_tracking_email_content'] );
 
25
  $email_content = wc_advanced_shipment_tracking_email_class()->email_content( $email_content, $order->get_id(), $order );
26
 
27
  /*
18
  if ( ! defined( 'ABSPATH' ) ) {
19
  exit;
20
  }
21
+
22
  $ast = new WC_Advanced_Shipment_Tracking_Actions();
23
 
24
+ $default_content = __( "Hi there. we thought you'd like to know that the shipment tracking for your recent order from {site_title} has been updated.", 'woo-advanced-shipment-tracking' );
25
+ $email_content = $ast->get_option_value_from_array( 'woocommerce_customer_updated_tracking_order_settings', 'wcast_updated_tracking_email_content', $default_content );
26
  $email_content = wc_advanced_shipment_tracking_email_class()->email_content( $email_content, $order->get_id(), $order );
27
 
28
  /*
woocommerce-advanced-shipment-tracking.php CHANGED
@@ -4,13 +4,13 @@
4
  * Plugin Name: Advanced Shipment Tracking for WooCommerce
5
  * Plugin URI: https://www.zorem.com/products/woocommerce-advanced-shipment-tracking/
6
  * Description: Add shipment tracking information to your WooCommerce orders and provide customers with an easy way to track their orders. Shipment tracking Info will appear in customers accounts (in the order panel) and in WooCommerce order complete email.
7
- * Version: 3.4.3
8
  * Author: zorem
9
  * Author URI: https://www.zorem.com
10
  * License: GPL-2.0+
11
  * License URI:
12
  * Text Domain: woo-advanced-shipment-tracking
13
- * WC tested up to: 6.6
14
  */
15
 
16
  class Zorem_Woocommerce_Advanced_Shipment_Tracking {
@@ -20,7 +20,7 @@ class Zorem_Woocommerce_Advanced_Shipment_Tracking {
20
  *
21
  * @var string
22
  */
23
- public $version = '3.4.3';
24
 
25
  /**
26
  * Initialize the main plugin function
4
  * Plugin Name: Advanced Shipment Tracking for WooCommerce
5
  * Plugin URI: https://www.zorem.com/products/woocommerce-advanced-shipment-tracking/
6
  * Description: Add shipment tracking information to your WooCommerce orders and provide customers with an easy way to track their orders. Shipment tracking Info will appear in customers accounts (in the order panel) and in WooCommerce order complete email.
7
+ * Version: 3.4.4
8
  * Author: zorem
9
  * Author URI: https://www.zorem.com
10
  * License: GPL-2.0+
11
  * License URI:
12
  * Text Domain: woo-advanced-shipment-tracking
13
+ * WC tested up to: 6.6.1
14
  */
15
 
16
  class Zorem_Woocommerce_Advanced_Shipment_Tracking {
20
  *
21
  * @var string
22
  */
23
+ public $version = '3.4.4';
24
 
25
  /**
26
  * Initialize the main plugin function