Changeset 2997508
- Timestamp:
- 11/17/2023 09:46:29 AM (2 years ago)
- Location:
- ship-depot/trunk
- Files:
-
- 7 edited
-
Ship_Depot_init.php (modified) (2 diffs)
-
assets/css/fe-checkout.css (modified) (1 diff)
-
helper/class-function-helper.php (modified) (1 diff)
-
includes/Settings/class-ship-depot-settings-backend.php (modified) (3 diffs)
-
page/admin/settings/sd-couriers.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
rest-api/class-shipdepot-webhook.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ship-depot/trunk/Ship_Depot_init.php
r2993025 r2997508 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. 17 * Version: 1.2.2 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. 1');37 define('SHIP_DEPOT_VERSION', '1.2.2'); 38 38 } 39 39 -
ship-depot/trunk/assets/css/fe-checkout.css
r2938579 r2997508 54 54 align-items: flex-start; 55 55 width: 100%; 56 flex-wrap: wrap; 56 57 } 57 58 58 59 #shipping_fee_content div.courier-fee img { 59 60 width: var(--img-service-width); 60 margin -top: 3px;61 margin: 5px 0 10px 0; 61 62 } 62 63 -
ship-depot/trunk/helper/class-function-helper.php
r2993025 r2997508 60 60 { 61 61 if (!isset($valueCheck)) return true; 62 if (is_null(($valueCheck) || empty($valueCheck))) return true; 63 if (!$valueCheck) return true; 62 if (is_null($valueCheck) || $valueCheck == '') return true; 64 63 return false; 65 64 } -
ship-depot/trunk/includes/Settings/class-ship-depot-settings-backend.php
r2992887 r2997508 419 419 } 420 420 421 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $fee_index_id . ' data: ' . print_r( sanitize_text_field($_POST[$fee_index_id]), true));421 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $fee_index_id . ' data: ' . print_r(($_POST[$fee_index_id]), true)); 422 422 //Order conditions 423 423 $fee->ListOrderConditions = []; … … 425 425 foreach ($_POST[$fee_index_id]['if'] as $index => $id) { 426 426 $if_id = sanitize_text_field($id); 427 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' data: ' . print_r( sanitize_text_field($_POST[$fee_index_id][$if_id]), true));427 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' data: ' . print_r(($_POST[$fee_index_id][$if_id]), true)); 428 428 $if = new Ship_Depot_Fee_Markup_Order_Condition(); 429 429 $idx = intval($index); … … 432 432 switch ($if->Type) { 433 433 case "total_amount": 434 $if->FromValue = Ship_Depot_Helper::check_null_or_empty(sanitize_text_field($_POST[$fee_index_id][$if_id]['from'])) ? -9999 : str_replace('.', '', sanitize_text_field($_POST[$fee_index_id][$if_id]['from'])); 435 $if->ToValue = Ship_Depot_Helper::check_null_or_empty(sanitize_text_field($_POST[$fee_index_id][$if_id]['to'])) ? -9999 : str_replace('.', '', sanitize_text_field($_POST[$fee_index_id][$if_id]['to'])); 434 $from = sanitize_text_field($_POST[$fee_index_id][$if_id]['from']); 435 $to = sanitize_text_field($_POST[$fee_index_id][$if_id]['to']); 436 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' from: ' . print_r($from, true)); 437 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' to: ' . print_r($to, true)); 438 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' check_null_or_empty to: ' . print_r(Ship_Depot_Helper::check_null_or_empty(($to)), true)); 439 Ship_Depot_Logger::wrlog('[save_fee_modify] ' . $if_id . ' check_null_or_empty from: ' . print_r(Ship_Depot_Helper::check_null_or_empty(($from)), true)); 440 $if->FromValue = Ship_Depot_Helper::check_null_or_empty($from) ? -9999 : intval(str_replace('.', '', $from)); 441 $if->ToValue = Ship_Depot_Helper::check_null_or_empty($to) ? -9999 : intval(str_replace('.', '', $to)); 436 442 break; 437 443 case "item_existed": -
ship-depot/trunk/page/admin/settings/sd-couriers.php
r2992887 r2997508 230 230 <!-- Ship from station --> 231 231 <div class="row"> 232 <div class="div-pick-station ">232 <div class="div-pick-station<?php echo $st_courier->IsUsed ? '' : ' disable-element' ?>"> 233 233 <input type="hidden" class="courier_data" name="<?php echo esc_attr($courier->CourierID) ?>[Data]" value="<?php echo esc_attr(Ship_Depot_Helper::ParseObjectToJsonHTML($courier_only)) ?>" /> 234 234 <p><?php esc_html_e('Hình thức gửi hàng', 'ship-depot-translate') ?></p> -
ship-depot/trunk/readme.txt
r2993025 r2997508 5 5 Tested up to: 6.3.2 6 6 Requires PHP: 7.4.3 7 Stable tag: 1.2. 17 Stable tag: 1.2.2 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.2 = 68 * Sửa một số lỗi nhỏ. 69 67 70 = 1.2.1 = 68 71 * Sửa một số lỗi nhỏ. -
ship-depot/trunk/rest-api/class-shipdepot-webhook.php
r2992887 r2997508 60 60 ]); 61 61 62 register_rest_route('shipdepot/webhook/v1', '/Test', [ 63 'methods' => 'POST', 64 'callback' => [$this, 'sd_update_shipping_status'], 62 register_rest_route('shipdepot/webhook/v1', '/PostHello', [ 63 'methods' => 'POST', 64 'callback' => [$this, 'sd_post_hello'], 65 'permission_callback' => '__return_true' 66 ]); 67 68 register_rest_route('shipdepot/webhook/v1', '/GetHello', [ 69 'methods' => 'GET', 70 'callback' => [$this, 'sd_get_hello'], 65 71 'permission_callback' => '__return_true' 66 72 ]); … … 329 335 return 'OK'; 330 336 } 337 338 function sd_post_hello($request) 339 { 340 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_post_hello] Begin'); 341 $params = wp_parse_args($request->get_params(), ''); 342 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_post_hello] params: ' . print_r($params, true)); 343 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_post_hello] End'); 344 345 nocache_headers(); 346 $result = new WP_REST_Response($params, 200); 347 return $result; 348 } 349 350 function sd_get_hello($request) 351 { 352 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_get_hello] Begin'); 353 $params = wp_parse_args($request->get_params(), ''); 354 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_get_hello] params: ' . print_r($params, true)); 355 Ship_Depot_Logger::wrlog('[Ship_Depot_Webhook][sd_get_hello] End'); 356 357 nocache_headers(); 358 $reponse = new stdClass(); 359 $reponse->message = 'ShipDepot Hello!'; 360 $reponse->params = $params; 361 $result = new WP_REST_Response($reponse, 200); 362 return $result; 363 } 331 364 } 332 365 new Ship_Depot_Webhook();
Note: See TracChangeset
for help on using the changeset viewer.