Changeset 3043419
- Timestamp:
- 03/01/2024 03:35:52 AM (2 years ago)
- Location:
- ship-depot/trunk
- Files:
-
- 3 added
- 6 edited
-
includes/Address/frontend/class-custom-checkout-fields.php (modified) (2 diffs)
-
includes/Settings/class-ship-depot-classic-checkout-direction.php (added)
-
includes/Settings/class-ship-depot-settings-backend.php (modified) (2 diffs)
-
includes/Settings/class-ship-depot-settings-init.php (modified) (1 diff)
-
includes/class-ship-depot-general.php (modified) (2 diffs)
-
page/admin/settings/sd-classic-checkout-direction.php (added)
-
page/frontend/sd-checkout-page.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/class_checkout_direction.mp4 (added)
Legend:
- Unmodified
- Added
- Removed
-
ship-depot/trunk/includes/Address/frontend/class-custom-checkout-fields.php
r3009769 r3043419 98 98 { 99 99 //Ship_Depot_Logger::wrlog('[sd_woocommerce_default_address_fields] fields: ' . print_r($fields, true)); 100 if (!Ship_Depot_Address_Helper::can_shipping_vietnam()) { 101 Ship_Depot_Logger::wrlog('[sd_woocommerce_default_address_fields] This page is not support shipping to Vietnam.'); 102 return $fields; 103 } 104 100 105 unset($fields['company']); 101 106 unset($fields['postcode']); 102 107 unset($fields['state']); 103 108 unset($fields['address_2']); 104 if (!Ship_Depot_Address_Helper::can_shipping_vietnam()) return $fields;105 109 $fields['first_name']['label'] = esc_html__('Tên', 'ship-depot-translate'); 106 110 … … 135 139 new Ship_Depot_Custom_fields(); 136 140 } 141 142 143 // add_filter('__experimental_woocommerce_blocks_register_checkout_field', 'custom_register_checkout_field'); 144 145 // function custom_register_checkout_field($fields) 146 // { 147 // // Replace 'custom_field' with your desired field name 148 // $fields['gov-id'] = array( 149 // 'label' => 'Government ID', 150 // 'optionalLabel' => 'Government ID (optional)', 151 // 'location' => 'address', 152 // 'required' => true, 153 // 'attributes' => array( 154 // 'autocomplete' => 'government-id', 155 // 'aria-describedby' => 'some-element', 156 // 'aria-label' => 'custom aria label', 157 // 'pattern' => '[A-Z0-9]{5}', // A 5-character string of capital letters and numbers. 158 // 'title' => 'Title to show on hover', 159 // 'data-custom' => 'custom data', 160 // ), 161 // ); 162 163 // return $fields; 164 // } -
ship-depot/trunk/includes/Settings/class-ship-depot-settings-backend.php
r3009769 r3043419 73 73 //Tạm đóng chức năng này 74 74 // 'custom_css' => __('Thay đổi CSS', 'ship-depot-translate'), 75 'about' => __('Giới thiệu & Trợ giúp', 'ship-depot-translate') 75 'about' => __('Giới thiệu & Trợ giúp', 'ship-depot-translate'), 76 'classic_checkout_direction' => __('Hướng dẫn trở về Classic Checkout', 'ship-depot-translate') 76 77 ); 77 78 … … 127 128 case 'about': 128 129 do_action('sd_about_section'); 130 break; 131 case 'classic_checkout_direction': 132 do_action('sd_classic_checkout_direction_section'); 129 133 break; 130 134 } -
ship-depot/trunk/includes/Settings/class-ship-depot-settings-init.php
r3009769 r3043419 14 14 require_once SHIP_DEPOT_DIR_PATH . 'includes/Settings/class-ship-depot-couriers.php'; 15 15 require_once SHIP_DEPOT_DIR_PATH . 'includes/Settings/class-ship-depot-about.php'; 16 require_once SHIP_DEPOT_DIR_PATH . 'includes/Settings/class-ship-depot-classic-checkout-direction.php'; 16 17 if (is_admin()) { 17 18 add_filter('woocommerce_get_settings_pages', array($this, 'add_woocommerce_settings_tab'), PHP_INT_MAX); -
ship-depot/trunk/includes/class-ship-depot-general.php
r3026645 r3043419 126 126 { 127 127 add_action('admin_notices', array($this, 'check_notify_update_plugin'), 99); 128 add_action('admin_notices', array($this, 'notify_switch_classic_checkout'), 99); 128 129 if (!Ship_Depot_Helper::is_woocommerce_activated()) { 129 130 add_action('admin_notices', array($this, 'no_woocommerce_deactivated'), 99); … … 508 509 } 509 510 511 public function notify_switch_classic_checkout() 512 { ?> 513 <div class="vf-notice notice notice-error is-dismissible"> 514 <p> 515 <?php 516 printf( 517 esc_html__('%s cần phải chỉnh về classic checkout để tránh bị lỗi. Vui lòng vào %s để xem hướng dẫn.', 'ship-depot-translate'), 518 '<strong>' . esc_html__('Ship Depot for WooCommerce', 'ship-depot-translate') . '</strong>', 519 '<a href="' . esc_url(get_site_url() . '/wp-admin/admin.php?page=wc-settings&tab=sd_settings§ion=classic_checkout_direction') . '">đây<strong></strong></a>' 520 ); 521 ?> 522 523 </p> 524 </div> 525 <?php 526 } 527 510 528 public function auto_deactivate() 511 529 { 512 ?>530 ?> 513 531 <?php 514 532 $vf_plugin = ''; -
ship-depot/trunk/page/frontend/sd-checkout-page.php
r3026645 r3043419 428 428 $product = $item_product->get_product(); 429 429 Ship_Depot_Logger::wrlog('[sd_action_checkout_order_processed] product: ' . print_r($product, true)); 430 // $item_product = new WC_Order_Item_Product($item); 431 // $product = new WC_Product($item_product->get_product_id()); 430 432 431 433 $package_size = new Ship_Depot_Package(); … … 580 582 Ship_Depot_Logger::wrlog('[sd_woocommerce_after_checkout_validation] data: ' . print_r($data, true)); 581 583 Ship_Depot_Logger::wrlog('[sd_woocommerce_after_checkout_validation] _POST: ' . print_r($_POST, true)); 584 // if (isset($_POST['sd_call_validate']) && sanitize_text_field($_POST['sd_call_validate']) == '1') { 585 // Ship_Depot_Logger::wrlog('[sd_woocommerce_after_checkout_validation] sd_call_validate: ' . print_r(sanitize_text_field($_POST['sd_call_validate']), true)); 586 // Ship_Depot_Logger::wrlog('[sd_woocommerce_after_checkout_validation] add fake error'); 587 // //Add fake error 588 // wc_add_notice(__("custom_notice", 'fake_error'), 'error'); 589 // } 582 590 //Check address 583 591 if (isset($data['ship_to_different_address']) && sanitize_text_field($data['ship_to_different_address']) == '1') { -
ship-depot/trunk/readme.txt
r3027204 r3043419 3 3 Tags: shipping, couriers, ghn, ghtk, aha 4 4 Requires at least: 6.1.1 5 Tested up to: 6.4. 25 Tested up to: 6.4.3 6 6 Requires PHP: 7.4.3 7 Stable tag: 1.2.1 37 Stable tag: 1.2.14 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.14 = 68 * Thêm phần hướng dẫn chỉnh về Classic Checkout trong trang Cài Đặt của Ship Depot. 69 67 70 = 1.2.13 = 68 71 * Sửa một số lỗi nhỏ.
Note: See TracChangeset
for help on using the changeset viewer.