From c02a792394d61f05f1628ae93975aa5421b69b71 Mon Sep 17 00:00:00 2001 From: Henry-fw Date: Mon, 1 Apr 2024 15:39:32 +0800 Subject: [PATCH] fix variable type = object not array --- aftership-woocommerce-tracking.php | 4 ++-- includes/class-aftership-actions.php | 2 +- readme.txt | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/aftership-woocommerce-tracking.php b/aftership-woocommerce-tracking.php index 9e0e4a1..9fef067 100644 --- a/aftership-woocommerce-tracking.php +++ b/aftership-woocommerce-tracking.php @@ -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.11 + * Version: 1.17.12 * Author: AfterShip * Author URI: http://aftership.com * @@ -20,7 +20,7 @@ require_once( 'woo-includes/woo-functions.php' ); -define( 'AFTERSHIP_VERSION', '1.17.11' ); +define( 'AFTERSHIP_VERSION', '1.17.12' ); define( 'AFTERSHIP_PATH', dirname( __FILE__ ) ); define( 'AFTERSHIP_ASSETS_URL', plugins_url() . '/' . basename( AFTERSHIP_PATH ) ); define( 'AFTERSHIP_SCRIPT_TAGS', 'aftership_script_tags' ); diff --git a/includes/class-aftership-actions.php b/includes/class-aftership-actions.php index 6c9eb75..1a15a56 100644 --- a/includes/class-aftership-actions.php +++ b/includes/class-aftership-actions.php @@ -454,7 +454,7 @@ public function post_order_tracking( $order_id, $args ) { $tracking_item['tracking_number'] = wc_clean( $args['tracking_number'] ); $tracking_item['tracking_id'] = md5( "{$tracking_item['slug']}-{$tracking_item['tracking_number']}" ); // need apply default value - $tracking_item['additional_fields'] = array(); + $tracking_item['additional_fields'] = new stdClass(); // line items for each tracking if ( isset( $args['line_items'] ) && is_array( $args['line_items'] ) && count( $args['line_items'] ) ) { $tracking_item['line_items'] = $args['line_items']; diff --git a/readme.txt b/readme.txt index 90cc6a3..5d687a9 100644 --- a/readme.txt +++ b/readme.txt @@ -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.11 +Stable tag: 1.17.12 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -141,6 +141,9 @@ Tailor a dynamic branded tracking page. Upload promotional banner, logo, and fav == Changelog == += 1.17.12 = +* Fix known issue + = 1.17.11 = * Fix known issue