Changeset 3404077
- Timestamp:
- 11/27/2025 12:30:57 PM (4 months ago)
- Location:
- shipo/trunk
- Files:
-
- 6 edited
-
assets/js/map.js (modified) (1 diff)
-
includes/class-shipo-checkout.php (modified) (2 diffs)
-
includes/class-shipo-order.php (modified) (1 diff)
-
includes/class-shipo-wc-shipping.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
shipo.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipo/trunk/assets/js/map.js
r3403157 r3404077 104 104 }); 105 105 106 var input_system = jQuery('<input>', { 107 type: 'hidden', 108 name: 'shipo_locker_system_id', 109 value: marker_data.details.system_id 110 }); 111 106 112 // Append to your container 107 113 html += input.prop('outerHTML'); 114 html += input_system.prop('outerHTML'); 108 115 } 109 116 else { -
shipo/trunk/includes/class-shipo-checkout.php
r3403157 r3404077 167 167 if (!empty($shipping_method_id) && isset($_POST['shipo_locker'])) { 168 168 $locker_data = sanitize_text_field(wp_unslash($_POST['shipo_locker'])); 169 169 $system_id = isset($_POST['shipo_locker_system_id']) ? sanitize_text_field(wp_unslash($_POST['shipo_locker_system_id'])) : ''; 170 171 $order->update_meta_data('_shipo_locker_data_json', urldecode($locker_data)); 172 $order->update_meta_data('_shipo_locker_data_system_id', $system_id); 173 170 174 if (!empty($locker_data)) { 171 // Decode the JSON data§ 172 $order->update_meta_data('_shipo_locker_data_json', json_encode(urldecode($locker_data))); 173 175 176 // Decode the locker data 174 177 $locker_obj = json_decode(urldecode($locker_data), true); 175 178 if ($locker_obj && is_array($locker_obj)) { 176 179 $locker_details = isset($locker_obj['details']) ? $locker_obj['details'] : []; 177 180 178 181 // Save the locker data in the order's meta data - sanitizing each value 179 182 if (isset($locker_obj['position'])) { … … 741 744 $shipping_methods = $order->get_shipping_methods(); 742 745 $shipo_data = []; 746 $is_shipo = false; 743 747 744 748 foreach ($shipping_methods as $shipping_method) { -
shipo/trunk/includes/class-shipo-order.php
r3395057 r3404077 102 102 103 103 if($recipient_address_type == 'locker') { 104 $shipment_data["recipient_address_id"] = (int)$this->order->get_meta('_shipo_locker_system_id'); 104 $shipment_data["recipient_address_id"] = $this->order->get_meta('_shipo_locker_system_id'); 105 $shipment_data["locker_data"] = json_decode($this->order->get_meta('_shipo_locker_data_json'), true); 106 $shipment_data["locker_system_id"] = json_decode($this->order->get_meta('_shipo_locker_data_system_id'), true); 105 107 } 106 108 -
shipo/trunk/includes/class-shipo-wc-shipping.php
r3395057 r3404077 242 242 } 243 243 } 244 else {245 $this->add_rate(array(246 'id' => $this->id . ':no_rates',247 'label' => __('Livrare prin curier', 'shipo'),248 'cost' => 0,249 ));250 }251 244 } 252 245 -
shipo/trunk/readme.txt
r3403157 r3404077 4 4 Requires at least: 4.7 5 5 Tested up to: 6.8 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 Requires PHP: 8.0 8 8 License: GPLv2 or later … … 46 46 Fix locker missing coordinates message 47 47 Fix locker data selector 48 49 = 1.2 = 50 51 Bug fix -
shipo/trunk/shipo.php
r3403157 r3404077 3 3 * Plugin Name: Shipo 4 4 * Description: Shipo connects your webshop with top couriers instantly, no contract. Ship to address or locker, pay only when parcels are delivered. 5 * Version: 1. 15 * Version: 1.2 6 6 * Author: Shipo 7 7 * Author URI: https://shipo.ro … … 16 16 17 17 // Define plugin constants 18 define('SHIPO_PLUGIN_VERSION', '1. 1.0');18 define('SHIPO_PLUGIN_VERSION', '1.2.0'); 19 19 define('SHIPO_PLUGIN_DIR', plugin_dir_path(__FILE__)); 20 20 define('SHIPO_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.