Skip to content

Commit

Permalink
Merge pull request #218 from hefawei/upgrade-import-tracking-number
Browse files Browse the repository at this point in the history
[CI]fix error - get_order_number
  • Loading branch information
hefawei authored Feb 20, 2024
2 parents 3f7399c + f4bfc8e commit 0bd73c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aftership-woocommerce-tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: AfterShip Tracking - All-In-One WooCommerce Order Tracking (Free plan available)
* Plugin URI: http://aftership.com/
* Description: Track orders in one place. shipment tracking, automated notifications, order lookup, branded tracking page, delivery day prediction
* Version: 1.17.8
* Version: 1.17.10
* Author: AfterShip
* Author URI: http://aftership.com
*
Expand All @@ -20,7 +20,7 @@

require_once( 'woo-includes/woo-functions.php' );

define( 'AFTERSHIP_VERSION', '1.17.8' );
define( 'AFTERSHIP_VERSION', '1.17.10' );
define( 'AFTERSHIP_PATH', dirname( __FILE__ ) );
define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) );
define( 'AFTERSHIP_SCRIPT_TAGS', 'aftership_script_tags' );
Expand Down
9 changes: 7 additions & 2 deletions includes/class-aftership-import-csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ public function add_menu() {
// The user has enabled Import Tracking.
// Only need detect once: the user's store order number has used default id or has customized order number
if ( empty( $this->options['import_tracking'] ) ) {
// Query the user's latest order to determine: 1. whether the user has used a custom number 2. the custom fields used
$this->check_use_custom_order_number();
try {
// Query the user's latest order to determine: 1. whether the user has used a custom number 2. the custom fields used
$this->check_use_custom_order_number();
} catch (Throwable $ex) {
return;
}
}
}

Expand All @@ -124,6 +128,7 @@ public function check_use_custom_order_number() {
// Query the user's latest order
$latest_orders = wc_get_orders(
array(
'type' => 'shop_order',
'limit' => 1,
'orderby' => 'date',
'order' => 'DESC',
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.aftership.com/
Tags: woocommerce shipping,woocommerce tracking,shipment tracking,order tracking, woocommerce,track order,dhl,ups,usps,fedex,shipping,tracking,order
Requires at least: 2.9
Tested up to: 6.3
Stable tag: 1.17.8
Stable tag: 1.17.10
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -141,7 +141,7 @@ Tailor a dynamic branded tracking page. Upload promotional banner, logo, and fav

== Changelog ==

= 1.17.8 =
= 1.17.10 =
* Enhancement: support order number column (csv template) for Import Tracking

= 1.17.0 =
Expand Down

0 comments on commit 0bd73c8

Please sign in to comment.