Plugin Directory

Changeset 3306870


Ignore:
Timestamp:
06/05/2025 07:43:24 AM (9 months ago)
Author:
shipany
Message:

release v1.1.78

Location:
shipany
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shipany/tags/1.1.78/includes/Utils/ShipanyHelper.php

    r3279574 r3306870  
    284284                $product_attribute = wc_get_product_variation_attributes($item['variation_id']);
    285285                $name .= current($product_attribute) ? (' : ' . current($product_attribute)) : '';
    286                 if (static::get_settings('shipany_send_product_attrs_to_shipany') == 'yes') {
     286                if (!is_array($item) && static::get_settings('shipany_send_product_attrs_to_shipany') == 'yes') {
    287287                    $attributes = implode(" ; ", array_map(function ($x) {
    288288                        return $x->key . ': ' . $x->value;
     
    591591    }
    592592
    593     public static function get_courier_service_location() {
    594         if (isset(static::$cache['courier_service_location']) && static::$cache['courier_service_location']) {
    595             return static::$cache['courier_service_location'];
    596         }
    597         $response = static::getInstance()->api_client->get('courier-service-location/published-locations');
    598         if ($response->status != 200) {
    599             return [];
    600         }
    601         $courier_service_location_list = $response->body->data->objects;
    602         static::$cache['courier_service_location'] = $courier_service_location_list;
    603         return $courier_service_location_list;
    604     }
    605 
    606593    public static function get_courier_service_point_locations() {
    607594        if (isset(static::$cache['courier_service_point_locations']) && static::$cache['courier_service_point_locations']) {
     
    10261013                foreach ([
    10271014                    ['Utils\ShipanyHelper', 'get_courier_service_point_locations'],
    1028                     ['Utils\ShipanyHelper', 'get_courier_service_location']
    10291015                ] as $func) {
    10301016                    $resp = call_user_func_array($func, []);
     
    11031089    public static function get_tracking_note_by_order_id($wc_order_id) {
    11041090        $wc_order = wc_get_order($wc_order_id);
    1105         $label_info = $wc_order->get_meta('_pr_shipment_shipany_label_tracking', true);
    1106         if ($label_info != "") {
    1107             return static::get_tracking_note(
    1108                 isset($label_info['tracking_number']) ? $label_info['tracking_number'] : $label_info['shipment_id'],
    1109                 $label_info['courier_tracking_number'],
    1110                 strtok($label_info['courier_service_plan'], '-'),
    1111                 $label_info['courier_tracking_url']
    1112             );
     1091        if($wc_order){
     1092            $label_info = $wc_order->get_meta('_pr_shipment_shipany_label_tracking', true);
     1093            if ($label_info != "") {
     1094                return static::get_tracking_note(
     1095                    isset($label_info['tracking_number']) ? $label_info['tracking_number'] : $label_info['shipment_id'],
     1096                    $label_info['courier_tracking_number'],
     1097                    strtok($label_info['courier_service_plan'], '-'),
     1098                    $label_info['courier_tracking_url']
     1099                );
     1100            }
    11131101        }
    11141102        return '';
  • shipany/tags/1.1.78/readme.txt

    r3281704 r3306870  
    44Requires at least: 4.1
    55Tested up to: 6.7.1
    6 Stable tag: 1.1.77
     6Stable tag: 1.1.78
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    7171== Changelog ==
    7272
     73= 1.1.78 =
     74- Bug fix
     75- Enhanced performance
     76
    7377= 1.1.77 =
    7478- Enhanced translation
  • shipany/tags/1.1.78/shipany-woocommerce.php

    r3281704 r3306870  
    77Plugin URI: http://wordpress.org/plugins/shipany
    88Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation.
    9 Version: 1.1.77
     9Version: 1.1.78
    1010Author: ShipAny
    1111Author URI: https://www.shipany.io
     
    493493                    }
    494494                    aTag = document.getElementById('onChangeLocation');
    495                     if(aTag) aTag.onclick = trigger_list;
     495                    if(aTag) aTag.onclick = () => {
     496                        jQuery('[id^="shipping_method_0_local_pickup"][type="radio"]')[0].click();
     497                    }
    496498                }
    497499                jQuery(document.body).on('updated_cart_totals', function () {
     
    650652    class SHIPANY_WC {
    651653        public static $list;
    652         private $version = "1.1.77";
     654        private $version = "1.1.78";
    653655
    654656        protected static $_instance = null;
  • shipany/trunk/includes/Utils/ShipanyHelper.php

    r3279574 r3306870  
    284284                $product_attribute = wc_get_product_variation_attributes($item['variation_id']);
    285285                $name .= current($product_attribute) ? (' : ' . current($product_attribute)) : '';
    286                 if (static::get_settings('shipany_send_product_attrs_to_shipany') == 'yes') {
     286                if (!is_array($item) && static::get_settings('shipany_send_product_attrs_to_shipany') == 'yes') {
    287287                    $attributes = implode(" ; ", array_map(function ($x) {
    288288                        return $x->key . ': ' . $x->value;
     
    591591    }
    592592
    593     public static function get_courier_service_location() {
    594         if (isset(static::$cache['courier_service_location']) && static::$cache['courier_service_location']) {
    595             return static::$cache['courier_service_location'];
    596         }
    597         $response = static::getInstance()->api_client->get('courier-service-location/published-locations');
    598         if ($response->status != 200) {
    599             return [];
    600         }
    601         $courier_service_location_list = $response->body->data->objects;
    602         static::$cache['courier_service_location'] = $courier_service_location_list;
    603         return $courier_service_location_list;
    604     }
    605 
    606593    public static function get_courier_service_point_locations() {
    607594        if (isset(static::$cache['courier_service_point_locations']) && static::$cache['courier_service_point_locations']) {
     
    10261013                foreach ([
    10271014                    ['Utils\ShipanyHelper', 'get_courier_service_point_locations'],
    1028                     ['Utils\ShipanyHelper', 'get_courier_service_location']
    10291015                ] as $func) {
    10301016                    $resp = call_user_func_array($func, []);
     
    11031089    public static function get_tracking_note_by_order_id($wc_order_id) {
    11041090        $wc_order = wc_get_order($wc_order_id);
    1105         $label_info = $wc_order->get_meta('_pr_shipment_shipany_label_tracking', true);
    1106         if ($label_info != "") {
    1107             return static::get_tracking_note(
    1108                 isset($label_info['tracking_number']) ? $label_info['tracking_number'] : $label_info['shipment_id'],
    1109                 $label_info['courier_tracking_number'],
    1110                 strtok($label_info['courier_service_plan'], '-'),
    1111                 $label_info['courier_tracking_url']
    1112             );
     1091        if($wc_order){
     1092            $label_info = $wc_order->get_meta('_pr_shipment_shipany_label_tracking', true);
     1093            if ($label_info != "") {
     1094                return static::get_tracking_note(
     1095                    isset($label_info['tracking_number']) ? $label_info['tracking_number'] : $label_info['shipment_id'],
     1096                    $label_info['courier_tracking_number'],
     1097                    strtok($label_info['courier_service_plan'], '-'),
     1098                    $label_info['courier_tracking_url']
     1099                );
     1100            }
    11131101        }
    11141102        return '';
  • shipany/trunk/readme.txt

    r3281704 r3306870  
    44Requires at least: 4.1
    55Tested up to: 6.7.1
    6 Stable tag: 1.1.77
     6Stable tag: 1.1.78
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    7171== Changelog ==
    7272
     73= 1.1.78 =
     74- Bug fix
     75- Enhanced performance
     76
    7377= 1.1.77 =
    7478- Enhanced translation
  • shipany/trunk/shipany-woocommerce.php

    r3281704 r3306870  
    77Plugin URI: http://wordpress.org/plugins/shipany
    88Description: ShipAny one-stop logistics platform interconnects WooCommerce to multiple logistics service providers (including SF Express, Kerry Express, SF Cold-Chain, Alfred Locker, Hongkong Post, SF Locker, Convenience Store, etc.) so merchants can enjoy full-set features of logistics automation which disrupt the manual logistics process and bring E-Commerce to new generation.
    9 Version: 1.1.77
     9Version: 1.1.78
    1010Author: ShipAny
    1111Author URI: https://www.shipany.io
     
    493493                    }
    494494                    aTag = document.getElementById('onChangeLocation');
    495                     if(aTag) aTag.onclick = trigger_list;
     495                    if(aTag) aTag.onclick = () => {
     496                        jQuery('[id^="shipping_method_0_local_pickup"][type="radio"]')[0].click();
     497                    }
    496498                }
    497499                jQuery(document.body).on('updated_cart_totals', function () {
     
    650652    class SHIPANY_WC {
    651653        public static $list;
    652         private $version = "1.1.77";
     654        private $version = "1.1.78";
    653655
    654656        protected static $_instance = null;
Note: See TracChangeset for help on using the changeset viewer.