Advanced Shipment Tracking for WooCommerce - Version 3.2.2.3

Version Description

  • Enhancement - Added datepicker on Add tracking lightbox on orders page
  • Enhancement - Removed the multiple API name option
  • Dev - Updated Admin html function
Download this release

Release Info

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

Code changes from version 3.2.2.2 to 3.2.2.3

assets/css/admin.css CHANGED
@@ -708,10 +708,11 @@ input.tab_input_1:checked + label{
708
  font-size: 11px;
709
  }
710
  .wcast-tracking-number-list li, .wcast-shipment-status-list li {
711
- position: relative;
712
- padding: 10px;
713
  min-height: 50px;
714
- box-sizing: border-box;
 
715
  }
716
  a.inline_tracking_delete{
717
  display:none;
@@ -2355,6 +2356,12 @@ ul.csv_error_details_ul li:before{
2355
  .wc-wp-version-gte-53 .multiple_select_container .select2-container .select2-selection--multiple{
2356
  border-color: #e0e0e0;
2357
  }
 
 
 
 
 
 
2358
 
2359
  /*** RTL CSS ***/
2360
  .rtl .zorem-layout__header .zorem-layout__header-breadcrumbs{
708
  font-size: 11px;
709
  }
710
  .wcast-tracking-number-list li, .wcast-shipment-status-list li {
711
+ position: relative;
712
+ padding: 5px;
713
  min-height: 50px;
714
+ box-sizing: border-box;
715
+ margin-bottom: 0;
716
  }
717
  a.inline_tracking_delete{
718
  display:none;
2356
  .wc-wp-version-gte-53 .multiple_select_container .select2-container .select2-selection--multiple{
2357
  border-color: #e0e0e0;
2358
  }
2359
+ .popupwrapper input[type=text].api_provider_name {
2360
+ width: calc(100% - 33px);
2361
+ }
2362
+ .ui-datepicker{
2363
+ z-index: 1000000 !important;
2364
+ }
2365
 
2366
  /*** RTL CSS ***/
2367
  .rtl .zorem-layout__header .zorem-layout__header-breadcrumbs{
assets/css/customizer-styles.css CHANGED
@@ -118,4 +118,8 @@
118
  }
119
  li#accordion-panel-widgets {
120
  display: none !important;
 
 
 
 
121
  }
118
  }
119
  li#accordion-panel-widgets {
120
  display: none !important;
121
+ }
122
+ .customize-control+.customize-control {
123
+ border-top: 1px solid #ddd;
124
+ padding-top: 10px;
125
  }
assets/js/admin.js CHANGED
@@ -70,6 +70,8 @@ jQuery( function( $ ) {
70
  checked = 'change_order_to_partial_shipped';
71
  } else if(change_order_to_shipped == 'change_order_to_shipped'){
72
  checked = 'change_order_to_shipped';
 
 
73
  } else if($('input#change_order_to_shipped').prop("checked") == true){
74
  checked = 'change_order_to_shipped';
75
  } else{
@@ -309,6 +311,11 @@ jQuery(document).on("click", ".add_inline_tracking", function(){
309
  } else{
310
  jQuery('.tracking_product_code_field').hide();
311
  }
 
 
 
 
 
312
  jQuery('.wc_actions').unblock();
313
  },
314
  error: function(response) {
70
  checked = 'change_order_to_partial_shipped';
71
  } else if(change_order_to_shipped == 'change_order_to_shipped'){
72
  checked = 'change_order_to_shipped';
73
+ } else if(change_order_to_shipped == 'change_order_to_custom_shipped'){
74
+ checked = 'change_order_to_shipped';
75
  } else if($('input#change_order_to_shipped').prop("checked") == true){
76
  checked = 'change_order_to_shipped';
77
  } else{
311
  } else{
312
  jQuery('.tracking_product_code_field').hide();
313
  }
314
+
315
+ jQuery( '.ast-date-picker-field' ).datepicker({
316
+ dateFormat: 'yy-mm-dd'
317
+ });
318
+
319
  jQuery('.wc_actions').unblock();
320
  },
321
  error: function(response) {
assets/js/shipping_row.js CHANGED
@@ -706,7 +706,7 @@ jQuery(document).on("click", ".edit_provider", function(){
706
  if( index == 0){
707
  jQuery('.edit_provider_popup .api_provider_name').val(value);
708
  } else{
709
- jQuery('.api_provider_name_container').append('<div class="api_provider_new"><input type="text" name="api_provider_name[]" class="api_provider_name" value="'+value+'" placeholder="API Name"></div>');
710
  }
711
  });
712
  } else{
706
  if( index == 0){
707
  jQuery('.edit_provider_popup .api_provider_name').val(value);
708
  } else{
709
+ //jQuery('.api_provider_name_container').append('<div class="api_provider_new"><input type="text" name="api_provider_name[]" class="api_provider_name" value="'+value+'" placeholder="API Name"></div>');
710
  }
711
  });
712
  } else{
includes/class-wc-advanced-shipment-tracking-admin.php CHANGED
@@ -102,7 +102,9 @@ class WC_Advanced_Shipment_Tracking_Admin {
102
 
103
  add_action( 'wp_ajax_update_custom_order_status_email_display', array( $this, 'update_custom_order_status_email_display_fun') );
104
 
105
- add_action( 'update_order_status_after_adding_tracking', array( $this, 'update_order_status_after_adding_tracking'), 10, 2 );
 
 
106
  }
107
 
108
  /*
@@ -490,7 +492,8 @@ class WC_Advanced_Shipment_Tracking_Admin {
490
  if( $array['show'] ) {
491
 
492
  if( 'checkbox' == $array['type'] ) {
493
- $checked = ( get_option( $id ) ) ? 'checked' : '' ;
 
494
  ?>
495
  <li>
496
  <input type="hidden" name="<?php esc_html_e( $id ); ?>" value="0"/>
@@ -504,8 +507,8 @@ class WC_Advanced_Shipment_Tracking_Admin {
504
  </li>
505
  <?php
506
  } else if ( 'tgl_checkbox' == $array['type'] ) {
507
-
508
- $checked = ( get_option( $id ) ) ? 'checked' : '' ;
509
  $tgl_class = isset( $array['tgl_color'] ) ? 'ast-tgl-btn-green' : '';
510
  $disabled = isset( $array['disabled'] ) && true == $array['disabled'] ? 'disabled' : '';
511
  ?>
@@ -1679,7 +1682,7 @@ class WC_Advanced_Shipment_Tracking_Admin {
1679
 
1680
  if ( isset( $d_s_p->api_provider_name ) && '' != $d_s_p->api_provider_name ) {
1681
 
1682
- if ( $this->isJSON( $d_s_p->api_provider_name ) ) {
1683
  $api_count = count( json_decode( $d_s_p->api_provider_name ) );
1684
  } else {
1685
  $api_count = 1;
@@ -2115,4 +2118,14 @@ class WC_Advanced_Shipment_Tracking_Admin {
2115
 
2116
  return $tracking_provider;
2117
  }
 
 
 
 
 
 
 
 
 
 
2118
  }
102
 
103
  add_action( 'wp_ajax_update_custom_order_status_email_display', array( $this, 'update_custom_order_status_email_display_fun') );
104
 
105
+ add_action( 'update_order_status_after_adding_tracking', array( $this, 'update_order_status_after_adding_tracking'), 10, 2 );
106
+
107
+ add_action( 'add_more_api_provider', array( $this, 'add_more_api_provider' ) );
108
  }
109
 
110
  /*
492
  if( $array['show'] ) {
493
 
494
  if( 'checkbox' == $array['type'] ) {
495
+ $default = isset( $array['default'] ) ? $array['default'] : '';
496
+ $checked = ( get_option( $id, $default ) ) ? 'checked' : '' ;
497
  ?>
498
  <li>
499
  <input type="hidden" name="<?php esc_html_e( $id ); ?>" value="0"/>
507
  </li>
508
  <?php
509
  } else if ( 'tgl_checkbox' == $array['type'] ) {
510
+ $default = isset( $array['default'] ) ? $array['default'] : '';
511
+ $checked = ( get_option( $id, $default ) ) ? 'checked' : '' ;
512
  $tgl_class = isset( $array['tgl_color'] ) ? 'ast-tgl-btn-green' : '';
513
  $disabled = isset( $array['disabled'] ) && true == $array['disabled'] ? 'disabled' : '';
514
  ?>
1682
 
1683
  if ( isset( $d_s_p->api_provider_name ) && '' != $d_s_p->api_provider_name ) {
1684
 
1685
+ if ( $this->isJSON( $d_s_p->api_provider_name ) && class_exists( 'ast_pro' ) ) {
1686
  $api_count = count( json_decode( $d_s_p->api_provider_name ) );
1687
  } else {
1688
  $api_count = 1;
2118
 
2119
  return $tracking_provider;
2120
  }
2121
+
2122
+ /*
2123
+ * function for add more provider btn
2124
+ */
2125
+ public function add_more_api_provider() {
2126
+ $tooltip_text = class_exists( 'ast_pro' ) ? __( "Add API Name alias", 'ast-pro' ) : __( "Multiple API names mapping is a pro features", 'woo-advanced-shipment-tracking' ) ;
2127
+ ?>
2128
+ <span class="dashicons dashicons-insert woocommerce-help-tip tipTip add_more_api_provider" title="<?php esc_html_e( $tooltip_text ); ?>"></span>
2129
+ <?php
2130
+ }
2131
  }
includes/class-wc-advanced-shipment-tracking-settings.php CHANGED
@@ -450,7 +450,7 @@ class WC_Advanced_Shipment_Tracking_Settings {
450
  </p>
451
  <p class="form-field date_shipped_field form-50">
452
  <label for="date_shipped"><?php esc_html_e( 'Date shipped:', 'woo-advanced-shipment-tracking'); ?></label>
453
- <input type="text" class="date-picker-field" name="date_shipped" id="date_shipped" value="<?php echo date_i18n( __( 'Y-m-d', 'woo-advanced-shipment-tracking' ), current_time( 'timestamp' ) ); ?>" placeholder="<?php echo date_i18n( esc_html_e( 'Y-m-d', 'woo-advanced-shipment-tracking' ), time() ); ?>">
454
  </p>
455
  <?php do_action( 'ast_after_tracking_field', $order_id ); ?>
456
  <hr>
450
  </p>
451
  <p class="form-field date_shipped_field form-50">
452
  <label for="date_shipped"><?php esc_html_e( 'Date shipped:', 'woo-advanced-shipment-tracking'); ?></label>
453
+ <input type="text" class="ast-date-picker-field" name="date_shipped" id="date_shipped" value="<?php echo date_i18n( __( 'Y-m-d', 'woo-advanced-shipment-tracking' ), current_time( 'timestamp' ) ); ?>" placeholder="<?php echo date_i18n( esc_html_e( 'Y-m-d', 'woo-advanced-shipment-tracking' ), time() ); ?>">
454
  </p>
455
  <?php do_action( 'ast_after_tracking_field', $order_id ); ?>
456
  <hr>
includes/class-wc-advanced-shipment-tracking-trackship.php CHANGED
@@ -1534,7 +1534,7 @@ class WC_Advanced_Shipment_Tracking_Trackship {
1534
  $custom_order_status[] = $key;
1535
  }
1536
 
1537
- if ( 'updated-tracking' == $order_status || 'completed' == $order_status || in_array( $order_status, $custom_order_status )){
1538
  return true;
1539
  } else {
1540
  return false;
1534
  $custom_order_status[] = $key;
1535
  }
1536
 
1537
+ if ( 'updated-tracking' == $order_status || 'completed' == $order_status || 'shipped' == $order_status || in_array( $order_status, $custom_order_status )){
1538
  return true;
1539
  } else {
1540
  return false;
includes/customizer/class-wc-tracking-info-customizer.php CHANGED
@@ -1127,7 +1127,6 @@ class wcast_initialise_customizer_settings {
1127
 
1128
  if ( false === $email_type )return false;
1129
 
1130
-
1131
  $order_status = 'completed';
1132
 
1133
  if($preview_id == '' || $preview_id == 'mockup') {
1127
 
1128
  if ( false === $email_type )return false;
1129
 
 
1130
  $order_status = 'completed';
1131
 
1132
  if($preview_id == '' || $preview_id == 'mockup') {
includes/views/admin_options_osm.php CHANGED
@@ -15,17 +15,25 @@
15
  </tr>
16
 
17
  <?php $osm_data = $this->get_osm_data();
18
- foreach( $osm_data as $status => $data ){ ?>
19
- <tr valign="top" class="<?php echo $status;?>_row <?php if(!get_option($data['id'])){echo 'disable_row'; } ?>">
 
 
 
 
 
 
 
 
20
  <td class="forminp">
21
  <input type="hidden" name="<?php echo $data['id'];?>" value="0"/>
22
- <input class="ast-tgl ast-tgl-flat order_status_toggle" id="<?php echo $data['id'];?>" name="<?php echo $data['id'];?>" type="checkbox" <?php if(get_option($data['id'])){echo 'checked'; } ?> value="1"/>
23
  <label class="ast-tgl-btn" for="<?php echo $data['id'];?>"></label>
24
  </td>
25
  <td class="forminp status-label-column">
26
  <span class="order-label <?php echo $data['label_class'];?>">
27
  <?php
28
- if(get_option($data['id'])){
29
  _e( wc_get_order_status_name( $data['slug'] ), 'woo-advanced-shipment-tracking' );
30
  } else{
31
  echo $data['label'];
15
  </tr>
16
 
17
  <?php $osm_data = $this->get_osm_data();
18
+ foreach( $osm_data as $status => $data ){
19
+ $checked = ( get_option( $data['id'] ) ) ? 'checked' : '';
20
+ $disable_row = ( !get_option( $data['id'] ) ) ? 'disable_row' : '';
21
+ $wc_ast_status_shipped = get_option( 'wc_ast_status_shipped' );
22
+ if( $wc_ast_status_shipped && $status == 'shipped' ) {
23
+ $checked = '';
24
+ $disable_row = 'disable_row';
25
+ }
26
+ ?>
27
+ <tr valign="top" class="<?php echo $status;?>_row <?php echo $disable_row; ?>">
28
  <td class="forminp">
29
  <input type="hidden" name="<?php echo $data['id'];?>" value="0"/>
30
+ <input class="ast-tgl ast-tgl-flat order_status_toggle" id="<?php echo $data['id'];?>" name="<?php echo $data['id'];?>" type="checkbox" value="1" <?php echo $checked; ?> />
31
  <label class="ast-tgl-btn" for="<?php echo $data['id'];?>"></label>
32
  </td>
33
  <td class="forminp status-label-column">
34
  <span class="order-label <?php echo $data['label_class'];?>">
35
  <?php
36
+ if ( get_option( $data['id'] ) ) {
37
  _e( wc_get_order_status_name( $data['slug'] ), 'woo-advanced-shipment-tracking' );
38
  } else{
39
  echo $data['label'];
readme.txt CHANGED
@@ -135,6 +135,11 @@ Yes, if you use external shipping services that work with the WooCommerce REST A
135
 
136
  == Changelog ==
137
 
 
 
 
 
 
138
  = 3.2.2.2 =
139
  * Enhancement - Update order details, Shipping address and billing address email template
140
  * Enhancement - Added admin notice and WooCommerce inbox message for Advanced Shipment Tracking PRO
135
 
136
  == Changelog ==
137
 
138
+ = 3.2.2.3 =
139
+ * Enhancement - Added datepicker on Add tracking lightbox on orders page
140
+ * Enhancement - Removed the multiple API name option
141
+ * Dev - Updated Admin html function
142
+
143
  = 3.2.2.2 =
144
  * Enhancement - Update order details, Shipping address and billing address email template
145
  * Enhancement - Added admin notice and WooCommerce inbox message for Advanced Shipment Tracking PRO
woocommerce-advanced-shipment-tracking.php CHANGED
@@ -4,7 +4,7 @@
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.2.2.2
8
  * Author: zorem
9
  * Author URI: https://www.zorem.com
10
  * License: GPL-2.0+
@@ -20,7 +20,7 @@ class zorem_woocommerce_advanced_shipment_tracking {
20
  *
21
  * @var string
22
  */
23
- public $version = '3.2.2.2';
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.2.2.3
8
  * Author: zorem
9
  * Author URI: https://www.zorem.com
10
  * License: GPL-2.0+
20
  *
21
  * @var string
22
  */
23
+ public $version = '3.2.2.3';
24
 
25
  /**
26
  * Initialize the main plugin function