Changeset 3015313
- Timestamp:
- 12/29/2023 04:11:00 AM (2 years ago)
- Location:
- ship-depot/trunk
- Files:
-
- 4 edited
-
Ship_Depot_init.php (modified) (2 diffs)
-
helper/class-function-helper.php (modified) (1 diff)
-
includes/Address/class-address-helper.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ship-depot/trunk/Ship_Depot_init.php
r3014866 r3015313 5 5 * Plugin URI: https://shipdepot.vn/ 6 6 * Description: Ship Depot support shipping couriers in Vietnam like GHN, GHTK, AhaMove. 7 * Version: 1.2. 87 * Version: 1.2.9 8 8 * Author: ShipDepot.vn 9 9 * Text Domain: ship-depot-translate … … 35 35 36 36 if (!defined('SHIP_DEPOT_VERSION')) { 37 define('SHIP_DEPOT_VERSION', '1.2. 8');37 define('SHIP_DEPOT_VERSION', '1.2.9'); 38 38 } 39 39 -
ship-depot/trunk/helper/class-function-helper.php
r3014867 r3015313 400 400 // Ship_Depot_Logger::wrlog('HPOS usage is enabled'); 401 401 // HPOS usage is enabled. 402 // Arrange meta boxes402 // Arrange meta boxes 403 403 return true; 404 404 } else { -
ship-depot/trunk/includes/Address/class-address-helper.php
r2999836 r3015313 7 7 if (!Ship_Depot_Helper::check_null_or_empty($json_provinces)) { 8 8 $all_pros = json_decode($json_provinces); 9 if ($all_pros != null) { 10 foreach ($all_pros as $province) { 11 (new self)->sort_districts($province); 12 } 13 } 9 14 return $all_pros; 10 15 } … … 24 29 foreach ($all_province as $province) { 25 30 if ($province->Code == $province_code) { 31 (new self)->sort_districts($province); 26 32 return $province; 27 33 } … … 36 42 foreach ($all_province as $province) { 37 43 if ($province->LocationISN == $province_isn) { 44 (new self)->sort_districts($province); 38 45 return $province; 39 46 } … … 46 53 $province = self::get_province_by_id($province_code); 47 54 if (is_null($province) || !$province) return false; 48 // Ship_Depot_Logger::wrlog('[get_all_district] districts: ' . print_r($province->ListDistricts, true));55 // Ship_Depot_Logger::wrlog('[get_all_district] districts: ' . print_r($province->ListDistricts, true)); 49 56 return $province->ListDistricts; 50 57 } … … 54 61 $province = self::get_province_by_isn($province_isn); 55 62 if (is_null($province) || !$province) return false; 56 // Ship_Depot_Logger::wrlog('[get_all_district] districts: ' . print_r($province->ListDistricts, true));63 // Ship_Depot_Logger::wrlog('[get_all_district_by_province_isn] districts: ' . print_r($province->ListDistricts, true)); 57 64 return $province->ListDistricts; 58 65 } … … 113 120 $list_return = []; 114 121 if (is_null($list_object) || !$list_object) return $list_return; 115 if ($sortBigCT){122 if ($sortBigCT) { 116 123 $list_big_ct = []; 117 124 foreach ($list_object as $obj) { 118 if (in_array($obj->Code, explode(',', BIG_CITY_CODE))){125 if (in_array($obj->Code, explode(',', BIG_CITY_CODE))) { 119 126 $list_big_ct[$obj->Code] = $obj->Name; 120 } else{127 } else { 121 128 $list_return[$obj->Code] = $obj->Name; 122 129 } 123 130 } 124 131 $list_return = $list_big_ct + $list_return; 125 } else{132 } else { 126 133 foreach ($list_object as $obj) { 127 134 $list_return[$obj->Code] = $obj->Name; 128 135 } 129 136 } 130 137 131 138 //Ship_Depot_Logger::wrlog('[sanitize_address_to_array] list_return: ' . print_r($list_return, true)); 132 139 return $list_return; … … 177 184 } 178 185 } 186 187 function sort_districts($province) 188 { 189 if ($province != null && $province->ListDistricts != null && count($province->ListDistricts) > 0) 190 usort($province->ListDistricts, function ($a, $b) { 191 return strcmp($b->Name, $a->Name); 192 }); 193 } 179 194 } -
ship-depot/trunk/readme.txt
r3014866 r3015313 5 5 Tested up to: 6.4.2 6 6 Requires PHP: 7.4.3 7 Stable tag: 1.2. 87 Stable tag: 1.2.9 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 65 65 66 66 == Changelog == 67 = 1.2.9 = 68 * Sắp xếp lại danh sách quận huyện. 69 67 70 = 1.2.8 = 68 71 * Thêm chức năng tự động Ngừng kích hoạt (Deactive) plugin Ship Depot sau khi Ngừng kích hoạt plugin WooCommerce (Deactive).
Note: See TracChangeset
for help on using the changeset viewer.