Changeset 3306870
- Timestamp:
- 06/05/2025 07:43:24 AM (9 months ago)
- Location:
- shipany
- Files:
-
- 6 edited
- 1 copied
-
tags/1.1.78 (copied) (copied from shipany/trunk)
-
tags/1.1.78/includes/Utils/ShipanyHelper.php (modified) (4 diffs)
-
tags/1.1.78/readme.txt (modified) (2 diffs)
-
tags/1.1.78/shipany-woocommerce.php (modified) (3 diffs)
-
trunk/includes/Utils/ShipanyHelper.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/shipany-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipany/tags/1.1.78/includes/Utils/ShipanyHelper.php
r3279574 r3306870 284 284 $product_attribute = wc_get_product_variation_attributes($item['variation_id']); 285 285 $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') { 287 287 $attributes = implode(" ; ", array_map(function ($x) { 288 288 return $x->key . ': ' . $x->value; … … 591 591 } 592 592 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 606 593 public static function get_courier_service_point_locations() { 607 594 if (isset(static::$cache['courier_service_point_locations']) && static::$cache['courier_service_point_locations']) { … … 1026 1013 foreach ([ 1027 1014 ['Utils\ShipanyHelper', 'get_courier_service_point_locations'], 1028 ['Utils\ShipanyHelper', 'get_courier_service_location']1029 1015 ] as $func) { 1030 1016 $resp = call_user_func_array($func, []); … … 1103 1089 public static function get_tracking_note_by_order_id($wc_order_id) { 1104 1090 $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 } 1113 1101 } 1114 1102 return ''; -
shipany/tags/1.1.78/readme.txt
r3281704 r3306870 4 4 Requires at least: 4.1 5 5 Tested up to: 6.7.1 6 Stable tag: 1.1.7 76 Stable tag: 1.1.78 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 71 71 == Changelog == 72 72 73 = 1.1.78 = 74 - Bug fix 75 - Enhanced performance 76 73 77 = 1.1.77 = 74 78 - Enhanced translation -
shipany/tags/1.1.78/shipany-woocommerce.php
r3281704 r3306870 7 7 Plugin URI: http://wordpress.org/plugins/shipany 8 8 Description: 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.7 79 Version: 1.1.78 10 10 Author: ShipAny 11 11 Author URI: https://www.shipany.io … … 493 493 } 494 494 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 } 496 498 } 497 499 jQuery(document.body).on('updated_cart_totals', function () { … … 650 652 class SHIPANY_WC { 651 653 public static $list; 652 private $version = "1.1.7 7";654 private $version = "1.1.78"; 653 655 654 656 protected static $_instance = null; -
shipany/trunk/includes/Utils/ShipanyHelper.php
r3279574 r3306870 284 284 $product_attribute = wc_get_product_variation_attributes($item['variation_id']); 285 285 $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') { 287 287 $attributes = implode(" ; ", array_map(function ($x) { 288 288 return $x->key . ': ' . $x->value; … … 591 591 } 592 592 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 606 593 public static function get_courier_service_point_locations() { 607 594 if (isset(static::$cache['courier_service_point_locations']) && static::$cache['courier_service_point_locations']) { … … 1026 1013 foreach ([ 1027 1014 ['Utils\ShipanyHelper', 'get_courier_service_point_locations'], 1028 ['Utils\ShipanyHelper', 'get_courier_service_location']1029 1015 ] as $func) { 1030 1016 $resp = call_user_func_array($func, []); … … 1103 1089 public static function get_tracking_note_by_order_id($wc_order_id) { 1104 1090 $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 } 1113 1101 } 1114 1102 return ''; -
shipany/trunk/readme.txt
r3281704 r3306870 4 4 Requires at least: 4.1 5 5 Tested up to: 6.7.1 6 Stable tag: 1.1.7 76 Stable tag: 1.1.78 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 71 71 == Changelog == 72 72 73 = 1.1.78 = 74 - Bug fix 75 - Enhanced performance 76 73 77 = 1.1.77 = 74 78 - Enhanced translation -
shipany/trunk/shipany-woocommerce.php
r3281704 r3306870 7 7 Plugin URI: http://wordpress.org/plugins/shipany 8 8 Description: 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.7 79 Version: 1.1.78 10 10 Author: ShipAny 11 11 Author URI: https://www.shipany.io … … 493 493 } 494 494 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 } 496 498 } 497 499 jQuery(document.body).on('updated_cart_totals', function () { … … 650 652 class SHIPANY_WC { 651 653 public static $list; 652 private $version = "1.1.7 7";654 private $version = "1.1.78"; 653 655 654 656 protected static $_instance = null;
Note: See TracChangeset
for help on using the changeset viewer.