AfterShip – WooCommerce Tracking - Version 1.6.10

Version Description

  • Added support for new woocommerce shipment plugins
Download this release

Release Info

Developer aftership
Plugin Icon 128x128 AfterShip – WooCommerce Tracking
Version 1.6.10
Comparing to
See all releases

Code changes from version 1.6.8 to 1.6.10

Files changed (2) hide show
  1. api/class-aftership-api-orders.php +15 -4
  2. readme.txt +5 -2
api/class-aftership-api-orders.php CHANGED
@@ -265,10 +265,21 @@ class AfterShip_API_Orders extends AfterShip_API_Resource
265
  'tracking_key' => get_post_meta($order->id, '_aftership_tracking_key', true),
266
  'tracking_destination_country' => get_post_meta($order->id, '_aftership_tracking_destination_country', true),
267
  );
268
- } else { //$49
269
- $order_data['aftership']['woocommerce']['trackings'][] = array(
270
- 'tracking_number' => get_post_meta($order->id, '_tracking_number', true),
271
- );
 
 
 
 
 
 
 
 
 
 
 
272
  }
273
  // aftership add finish
274
 
265
  'tracking_key' => get_post_meta($order->id, '_aftership_tracking_key', true),
266
  'tracking_destination_country' => get_post_meta($order->id, '_aftership_tracking_destination_country', true),
267
  );
268
+ }
269
+ if ($tn == NULL) {
270
+ // Handle old Shipping Tracking plugin
271
+ $tn = get_post_meta($order->id, '_tracking_number', true);
272
+ if ($tn == NULL) {
273
+ // Handle new Shipping Tracking plugin version higher than 1.6.4
274
+ $order_data['aftership']['woocommerce']['trackings'][] = array(
275
+ 'tracking_number' => get_post_meta($order->id, '_wc_shipment_tracking_items', true)[0]['tracking_number'],
276
+ 'tracking_provider' => get_post_meta($order->id, '_wc_shipment_tracking_items', true)[0]['custom_tracking_provider'],
277
+ );
278
+ } else {
279
+ $order_data['aftership']['woocommerce']['trackings'][] = array(
280
+ 'tracking_number' => $tn,
281
+ );
282
+ }
283
  }
284
  // aftership add finish
285
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: aftership
3
  Donate link: https://www.aftership.com/
4
  Tags: shipping, tracking, ups, usps, fedex, dhl, tnt, dpd, post, shipment, woocommerce, tracking number, aftership, package tracking, fulfilment, tracking link, carrier, courier, woo commerce, woocommerce shipment tracking, shipping details plugin, widget, shipstation, track, package
5
  Requires at least: 2.9
6
- Tested up to: 4.2.2
7
- Stable tag: 1.6.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,9 @@ You'll find the FAQ on [AfterShip.com](https://aftership.uservoice.com/knowledge
97
 
98
  == Changelog ==
99
 
 
 
 
100
  = 1.6.8 =
101
  * Fix compatibility issue with Sendcloud plugin
102
 
3
  Donate link: https://www.aftership.com/
4
  Tags: shipping, tracking, ups, usps, fedex, dhl, tnt, dpd, post, shipment, woocommerce, tracking number, aftership, package tracking, fulfilment, tracking link, carrier, courier, woo commerce, woocommerce shipment tracking, shipping details plugin, widget, shipstation, track, package
5
  Requires at least: 2.9
6
+ Tested up to: 4.8
7
+ Stable tag: 1.6.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.6.10 =
101
+ * Added support for new woocommerce shipment plugins
102
+
103
  = 1.6.8 =
104
  * Fix compatibility issue with Sendcloud plugin
105