Changeset 3490045
- Timestamp:
- 03/24/2026 01:14:51 PM (5 days ago)
- Location:
- europarcel-com
- Files:
-
- 36 edited
- 1 copied
-
tags/1.0.9 (copied) (copied from europarcel-com/trunk)
-
tags/1.0.9/README.txt (modified) (3 diffs)
-
tags/1.0.9/assets/css/europarcel-admin.css (modified) (1 diff)
-
tags/1.0.9/assets/js/europarcel-admin.js (modified) (1 diff)
-
tags/1.0.9/assets/js/europarcel-locker-selector.js (modified) (2 diffs)
-
tags/1.0.9/assets/js/europarcel-modal.js (modified) (5 diffs)
-
tags/1.0.9/europarcel-com.php (modified) (10 diffs)
-
tags/1.0.9/includes/class-europarcel-activator.php (modified) (3 diffs)
-
tags/1.0.9/includes/class-europarcel-checkout.php (modified) (12 diffs)
-
tags/1.0.9/includes/class-europarcel-constants.php (modified) (4 diffs)
-
tags/1.0.9/includes/class-europarcel-customer.php (modified) (12 diffs)
-
tags/1.0.9/includes/class-europarcel-deactivator.php (modified) (3 diffs)
-
tags/1.0.9/includes/class-europarcel-http-request.php (modified) (8 diffs)
-
tags/1.0.9/includes/class-europarcel-main.php (modified) (13 diffs)
-
tags/1.0.9/includes/class-europarcel-request-data.php (modified) (9 diffs)
-
tags/1.0.9/includes/class-europarcel-shipping.php (modified) (7 diffs)
-
tags/1.0.9/languages/europarcel-com-ro_RO.mo (modified) (previous)
-
tags/1.0.9/languages/europarcel-com-ro_RO.po (modified) (2 diffs)
-
tags/1.0.9/uninstall.php (modified) (1 diff)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/assets/css/europarcel-admin.css (modified) (1 diff)
-
trunk/assets/js/europarcel-admin.js (modified) (1 diff)
-
trunk/assets/js/europarcel-locker-selector.js (modified) (2 diffs)
-
trunk/assets/js/europarcel-modal.js (modified) (5 diffs)
-
trunk/europarcel-com.php (modified) (10 diffs)
-
trunk/includes/class-europarcel-activator.php (modified) (3 diffs)
-
trunk/includes/class-europarcel-checkout.php (modified) (12 diffs)
-
trunk/includes/class-europarcel-constants.php (modified) (4 diffs)
-
trunk/includes/class-europarcel-customer.php (modified) (12 diffs)
-
trunk/includes/class-europarcel-deactivator.php (modified) (3 diffs)
-
trunk/includes/class-europarcel-http-request.php (modified) (8 diffs)
-
trunk/includes/class-europarcel-main.php (modified) (13 diffs)
-
trunk/includes/class-europarcel-request-data.php (modified) (9 diffs)
-
trunk/includes/class-europarcel-shipping.php (modified) (7 diffs)
-
trunk/languages/europarcel-com-ro_RO.mo (modified) (previous)
-
trunk/languages/europarcel-com-ro_RO.po (modified) (2 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
europarcel-com/tags/1.0.9/README.txt
r3478259 r3490045 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 77 77 == Changelog == 78 78 79 = 1.0.9 = 80 * Added mandatory locker selection validation at checkout for both Classic and Blocks checkout 81 * Customers must now select a delivery locker before placing an order when locker shipping is chosen 82 79 83 = 1.0.8 = 80 84 * Fixed: Price fields now accept decimal values (e.g., 15.99) instead of integers only … … 107 111 == Upgrade Notice == 108 112 113 = 1.0.9 = 114 Locker selection is now mandatory at checkout when a locker shipping method is chosen. 115 109 116 = 1.0.8 = 110 117 Bug fix: Price fields now accept decimal values. -
europarcel-com/tags/1.0.9/assets/css/europarcel-admin.css
r3478259 r3490045 6 6 * 7 7 * @package Europarcel 8 * @since 1.0. 88 * @since 1.0.9 9 9 */ 10 10 -
europarcel-com/tags/1.0.9/assets/js/europarcel-admin.js
r3478259 r3490045 6 6 * 7 7 * @package Europarcel 8 * @since 1.0. 88 * @since 1.0.9 9 9 */ 10 10 -
europarcel-com/tags/1.0.9/assets/js/europarcel-locker-selector.js
r3478259 r3490045 7 7 * 8 8 * @package Europarcel 9 * @since 1.0. 89 * @since 1.0.9 10 10 */ 11 11 … … 366 366 } 367 367 368 // Hide any locker validation error notices (don't remove — React manages these nodes) 369 document.querySelectorAll('.wc-block-store-notice, .woocommerce-error, .wc-block-components-notice-banner').forEach(function(notice) { 370 if (notice.textContent && notice.textContent.indexOf('locker') !== -1) { 371 notice.style.display = 'none'; 372 } 373 }); 374 368 375 displayLockerInfo(locker, true); 369 376 updateWooCommerceFields(locker); -
europarcel-com/tags/1.0.9/assets/js/europarcel-modal.js
r3478259 r3490045 7 7 * @package Europarcel 8 8 * @subpackage Assets/JavaScript 9 * @since 1.0. 89 * @since 1.0.9 10 10 */ 11 11 … … 16 16 * EuroParcel Modal object 17 17 * 18 * @since 1.0. 818 * @since 1.0.9 19 19 */ 20 20 window.EuroparcelModal = { … … 26 26 * Handles both desktop and mobile responsive display. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @param {string} iframeUrl - The URL to load in the iframe 30 30 */ … … 92 92 * Configures click handlers, escape key handler, and other modal interactions. 93 93 * 94 * @since 1.0. 894 * @since 1.0.9 95 95 * @param {HTMLElement} modal - The modal element 96 96 * @param {boolean} isMobile - Whether the device is mobile … … 141 141 * Cleans up event listeners to prevent memory leaks. 142 142 * 143 * @since 1.0. 8143 * @since 1.0.9 144 144 */ 145 145 close: function() { -
europarcel-com/tags/1.0.9/europarcel-com.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * @package Europarcel 13 13 * … … 15 15 * Plugin Name: EuroParcel Integration for WooCommerce 16 16 * Description: Connect your WooCommerce store with eAWB shipping platform 17 * Version: 1.0. 817 * Version: 1.0.9 18 18 * Author: EuroParcel 19 19 * Author URI: https://eawb.ro/ … … 31 31 } 32 32 33 define('EUROPARCELCOM_WC_VERSION', '1.0. 8');33 define('EUROPARCELCOM_WC_VERSION', '1.0.9'); 34 34 35 35 /** … … 65 65 * Declare compatibility with WooCommerce High-Performance Order Storage (HPOS) 66 66 * 67 * @since 1.0. 867 * @since 1.0.9 68 68 */ 69 69 add_action('before_woocommerce_init', function() { … … 76 76 * Initialize the shipping method 77 77 * 78 * @since 1.0. 878 * @since 1.0.9 79 79 */ 80 80 add_action('woocommerce_shipping_init', 'europarcelcom_wc_shipping_init'); … … 83 83 * Load the shipping method class 84 84 * 85 * @since 1.0. 885 * @since 1.0.9 86 86 */ 87 87 function europarcelcom_wc_shipping_init() { … … 95 95 * Register the shipping method with WooCommerce 96 96 * 97 * @since 1.0. 897 * @since 1.0.9 98 98 * @param array $methods Existing shipping methods 99 99 * @return array Updated shipping methods … … 107 107 * Enqueue admin styles and scripts 108 108 * 109 * @since 1.0. 8109 * @since 1.0.9 110 110 */ 111 111 add_action('admin_enqueue_scripts', function () { 112 112 $current_screen = get_current_screen(); 113 113 if (is_admin() && $current_screen && strpos($current_screen->id, 'woocommerce_page_wc-settings') !== false) { 114 wp_enqueue_style('europarcel-admin', plugins_url('assets/css/europarcel-admin.css', __FILE__), array(), '1.0. 8');115 wp_enqueue_script('europarcel-admin', plugins_url('assets/js/europarcel-admin.js', __FILE__), array('jquery', 'select2'), '1.0. 8', true);114 wp_enqueue_style('europarcel-admin', plugins_url('assets/css/europarcel-admin.css', __FILE__), array(), '1.0.9'); 115 wp_enqueue_script('europarcel-admin', plugins_url('assets/js/europarcel-admin.js', __FILE__), array('jquery', 'select2'), '1.0.9', true); 116 116 } 117 117 }); … … 120 120 * Initialize the main plugin class 121 121 * 122 * @since 1.0. 8122 * @since 1.0.9 123 123 */ 124 124 function europarcelcom_wc_plugin_run() { … … 131 131 132 132 /** 133 * Locker selection validation - Classic checkout 134 * 135 * @since 1.0.9 136 */ 137 add_action('woocommerce_after_checkout_validation', function($data, $errors) { 138 $message = EuroParcelComWC_Checkout::check_locker_selection(); 139 if ($message) { 140 $errors->add('europarcel_locker_required', $message); 141 } 142 }, 10, 2); 143 144 /** 145 * Locker selection validation - Blocks checkout (Store API) 146 * 147 * @since 1.0.9 148 */ 149 add_action('woocommerce_store_api_checkout_update_order_from_request', function($order, $request) { 150 $message = EuroParcelComWC_Checkout::check_locker_selection(); 151 if ($message) { 152 throw new \Automattic\WooCommerce\StoreApi\Exceptions\RouteException( 153 'europarcel_locker_required', 154 $message, 155 400 156 ); 157 } 158 }, 10, 2); 159 160 /** 133 161 * Add plugin row meta links (Documentation, Video Tutorial) 134 162 * 135 * @since 1.0. 8163 * @since 1.0.9 136 164 * @param array $links Existing meta links 137 165 * @param string $file Plugin file path -
europarcel-com/tags/1.0.9/includes/class-europarcel-activator.php
r3478259 r3490045 9 9 * 10 10 * @link https://europarcel.com 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 20 20 * This class defines all code necessary to run during the plugin's activation. 21 21 * 22 * @since 1.0. 822 * @since 1.0.9 23 23 * @package Europarcel 24 24 * @subpackage Europarcel/includes … … 32 32 * Handles any setup tasks required when the plugin is activated. 33 33 * 34 * @since 1.0. 834 * @since 1.0.9 35 35 */ 36 36 public static function activate() { 37 37 // Store plugin version 38 38 if (!get_option('EUROPARCELCOM_WC_VERSION')) { 39 add_option('EUROPARCELCOM_WC_VERSION', '1.0. 8');39 add_option('EUROPARCELCOM_WC_VERSION', '1.0.9'); 40 40 } 41 41 -
europarcel-com/tags/1.0.9/includes/class-europarcel-checkout.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 28 28 * for locker selection and shipping updates. 29 29 * 30 * @since 1.0. 830 * @since 1.0.9 31 31 * @package Europarcel 32 32 * @subpackage Europarcel/includes … … 38 38 * Whether the current checkout is blocks-based 39 39 * 40 * @since 1.0. 840 * @since 1.0.9 41 41 * @access private 42 42 * @var bool $is_blocks_checkout True if blocks checkout detected … … 50 50 * via smart_init method to detect checkout type first. 51 51 * 52 * @since 1.0. 852 * @since 1.0.9 53 53 */ 54 54 public function __construct() { … … 62 62 * or Blocks-based and initializes the appropriate functionality. 63 63 * 64 * @since 1.0. 864 * @since 1.0.9 65 65 */ 66 66 public function smart_init() { … … 83 83 * Enqueues scripts and localizes data for WooCommerce Blocks checkout. 84 84 * 85 * @since 1.0. 885 * @since 1.0.9 86 86 */ 87 87 private function init_blocks_checkout() { … … 96 96 * Enqueues scripts and localizes data for WooCommerce Classic checkout. 97 97 * 98 * @since 1.0. 898 * @since 1.0.9 99 99 */ 100 100 private function init_classic_checkout() { … … 110 110 * and checkout type information for JavaScript usage. 111 111 * 112 * @since 1.0. 8112 * @since 1.0.9 113 113 */ 114 114 private function localize_script_data() { … … 191 191 * Validates nonce and returns carrier data via JSON response. 192 192 * 193 * @since 1.0. 8193 * @since 1.0.9 194 194 */ 195 195 public function wp_ajax_europarcelcomwc_get_locker_carriers() { … … 221 221 * Validates nonce and sanitizes all input data. 222 222 * 223 * @since 1.0. 8223 * @since 1.0.9 224 224 */ 225 225 public function wp_ajax_europarcelcomwc_update_locker_shipping() { … … 271 271 272 272 /** 273 * Check if the chosen shipping method requires a locker and if one is selected 274 * 275 * Shared validation logic used by both Classic and Blocks checkout. 276 * Returns null if validation passes, or an error message string if it fails. 277 * 278 * @since 1.0.9 279 * @return string|null Error message if locker not selected, null if valid 280 */ 281 public static function check_locker_selection() { 282 $chosen_methods = WC()->session->get('chosen_shipping_methods', []); 283 284 if (empty($chosen_methods)) { 285 return null; 286 } 287 288 $is_locker = false; 289 $instance_id = null; 290 291 foreach ($chosen_methods as $method) { 292 if (strpos($method, 'europarcelcom_wc_shipping') !== false && strpos($method, '_locker') !== false) { 293 $is_locker = true; 294 $parts = explode(':', $method); 295 if (isset($parts[1]) && preg_match('/^(\d+)/', $parts[1], $matches)) { 296 $instance_id = $matches[1]; 297 } 298 break; 299 } 300 } 301 302 if (!$is_locker) { 303 return null; 304 } 305 306 // Check session locker_info 307 $locker_info = WC()->session->get('locker_info'); 308 if (!empty($locker_info) && !empty($locker_info['locker_id'])) { 309 if ($instance_id === null || (isset($locker_info['instance_id']) && $locker_info['instance_id'] == $instance_id)) { 310 return null; 311 } 312 } 313 314 // Check saved user lockers 315 $user_id = get_current_user_id(); 316 if ($user_id && $instance_id !== null) { 317 $user_lockers = get_user_meta($user_id, 'europarcelcom_wc_carrier_lockers', true); 318 if (is_array($user_lockers) && isset($user_lockers[$instance_id]) && !empty($user_lockers[$instance_id]['locker_id'])) { 319 return null; 320 } 321 } 322 323 return __('Please select a delivery locker before placing your order.', 'europarcel-com'); 324 } 325 326 /** 327 * Validate locker selection for classic checkout 328 * 329 * Hooked to woocommerce_after_checkout_validation. 330 * 331 * @since 1.0.9 332 * @param array $data Checkout posted data 333 * @param WP_Error $errors Validation errors object 334 */ 335 public function validate_checkout_locker($data, $errors) { 336 $message = self::check_locker_selection(); 337 if ($message) { 338 $errors->add('europarcel_locker_required', $message); 339 } 340 } 341 342 /** 343 * Validate locker selection for blocks checkout 344 * 345 * Hooked to woocommerce_store_api_checkout_update_order_from_request. 346 * 347 * @since 1.0.9 348 * @param WC_Order $order The order being created 349 * @param \Automattic\WooCommerce\StoreApi\Routes\V1\Checkout $request The checkout request 350 */ 351 public function validate_blocks_checkout_locker($order, $request) { 352 $message = self::check_locker_selection(); 353 if ($message) { 354 throw new \Automattic\WooCommerce\StoreApi\Exceptions\RouteException( 355 'europarcel_locker_required', 356 $message, 357 400 358 ); 359 } 360 } 361 362 /** 273 363 * Display locker selection button for classic checkout 274 364 * … … 276 366 * the locker selection button in classic checkout when applicable. 277 367 * 278 * @since 1.0. 8368 * @since 1.0.9 279 369 */ 280 370 public function classic_checkout_button() { -
europarcel-com/tags/1.0.9/includes/class-europarcel-constants.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 27 27 * shipping services for both admin configuration and API requests. 28 28 * 29 * @since 1.0. 829 * @since 1.0.9 30 30 * @package Europarcel 31 31 * @subpackage Europarcel/includes … … 41 41 * All strings are internationalized for translation support. 42 42 * 43 * @since 1.0. 843 * @since 1.0.9 44 44 * @return array Array of service keys and their translated display names 45 45 */ … … 69 69 * - 2: Locker delivery (home to locker) 70 70 * 71 * @since 1.0. 871 * @since 1.0.9 72 72 * @param array|string $services Array of service keys to convert (or string for backward compatibility) 73 73 * @return array Array of carrier configuration arrays -
europarcel-com/tags/1.0.9/includes/class-europarcel-customer.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 31 31 * and carrier service availability. 32 32 * 33 * @since 1.0. 833 * @since 1.0.9 34 34 * @package Europarcel 35 35 * @subpackage Europarcel/includes … … 41 41 * The WooCommerce shipping instance ID 42 42 * 43 * @since 1.0. 843 * @since 1.0.9 44 44 * @access private 45 45 * @var int $instance_id WooCommerce shipping method instance ID … … 50 50 * The shipping method settings 51 51 * 52 * @since 1.0. 852 * @since 1.0.9 53 53 * @access public 54 54 * @var array $settings WooCommerce shipping method settings … … 62 62 * configuration and loads the associated settings. 63 63 * 64 * @since 1.0. 864 * @since 1.0.9 65 65 * @param int $instance_id WooCommerce shipping method instance ID 66 66 */ … … 76 76 * the EuroParcel API including name, contact details, and account status. 77 77 * 78 * @since 1.0. 878 * @since 1.0.9 79 79 * @return array|null Customer account data or null on failure 80 80 */ … … 100 100 * EuroParcel account for use in shipping calculations. 101 101 * 102 * @since 1.0. 8102 * @since 1.0.9 103 103 * @return array Array of billing addresses with ID as key and formatted address as value 104 104 */ … … 138 138 * EuroParcel account for use as pickup locations. 139 139 * 140 * @since 1.0. 8140 * @since 1.0.9 141 141 * @return array Array of pickup addresses with ID as key and formatted address as value 142 142 */ … … 177 177 * and destination address. 178 178 * 179 * @since 1.0. 8179 * @since 1.0.9 180 180 * @param array $package WooCommerce package data with destination details 181 181 * @param bool $allow_locker Whether to include locker delivery options … … 262 262 * Used with usort() to arrange services from lowest to highest cost. 263 263 * 264 * @since 1.0. 8264 * @since 1.0.9 265 265 * @param array $first_service First service for comparison 266 266 * @param array $second_service Second service for comparison … … 280 280 * based on the configured available services. 281 281 * 282 * @since 1.0. 8282 * @since 1.0.9 283 283 * @return array Array of carrier IDs that support locker delivery 284 284 */ … … 316 316 * based on the configured available services. 317 317 * 318 * @since 1.0. 8318 * @since 1.0.9 319 319 * @return array|false Array of carrier IDs that support standard delivery or false if none available 320 320 */ -
europarcel-com/tags/1.0.9/includes/class-europarcel-deactivator.php
r3478259 r3490045 9 9 * 10 10 * @link https://europarcel.com 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 20 20 * This class defines all code necessary to run during the plugin's deactivation. 21 21 * 22 * @since 1.0. 822 * @since 1.0.9 23 23 * @package Europarcel 24 24 * @subpackage Europarcel/includes … … 32 32 * Handles any cleanup tasks required when the plugin is deactivated. 33 33 * 34 * @since 1.0. 834 * @since 1.0.9 35 35 */ 36 36 public static function deactivate() { -
europarcel-com/tags/1.0.9/includes/class-europarcel-http-request.php
r3478259 r3490045 8 8 * 9 9 * @link https://eawb.ro 10 * @since 1.0. 810 * @since 1.0.9 11 11 * 12 12 * @package Europarcel … … 26 26 * for both GET and POST requests with proper error handling. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @package Europarcel 30 30 * @subpackage Europarcel/includes … … 36 36 * The shipping method instance ID 37 37 * 38 * @since 1.0. 838 * @since 1.0.9 39 39 * @access private 40 40 * @var int $instance_id WooCommerce shipping method instance ID … … 48 48 * shipping method settings and API key. 49 49 * 50 * @since 1.0. 850 * @since 1.0.9 51 51 * @param int $instance_id WooCommerce shipping method instance ID 52 52 */ … … 60 60 * query parameters and handles the response. 61 61 * 62 * @since 1.0. 862 * @since 1.0.9 63 63 * @param string $function API endpoint function name 64 64 * @param array $data Optional query parameters … … 89 89 * the provided data and handles the response. 90 90 * 91 * @since 1.0. 891 * @since 1.0.9 92 92 * @param string $function API endpoint function name 93 93 * @param array $data POST data to send … … 115 115 * Throws exceptions for various error conditions. 116 116 * 117 * @since 1.0. 8117 * @since 1.0.9 118 118 * @param array|WP_Error $response WordPress HTTP API response 119 119 * @return array Decoded JSON response … … 155 155 * the headers required for EuroParcel API authentication. 156 156 * 157 * @since 1.0. 8157 * @since 1.0.9 158 158 * @return array HTTP headers array with API key 159 159 */ -
europarcel-com/tags/1.0.9/includes/class-europarcel-main.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 26 26 * both classic and blocks checkout types. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @package Europarcel 30 30 * @subpackage Europarcel/includes … … 36 36 * The plugin name 37 37 * 38 * @since 1.0. 838 * @since 1.0.9 39 39 * @access protected 40 40 * @var string $plugin_name The plugin identifier name … … 45 45 * The plugin version 46 46 * 47 * @since 1.0. 847 * @since 1.0.9 48 48 * @access protected 49 49 * @var string $version The current plugin version … … 54 54 * The checkout handler instance 55 55 * 56 * @since 1.0. 856 * @since 1.0.9 57 57 * @access protected 58 58 * @var EuroparcelCheckout $checkout_handler Handles checkout functionality … … 66 66 * and defines WooCommerce hooks for checkout functionality. 67 67 * 68 * @since 1.0. 868 * @since 1.0.9 69 69 */ 70 70 public function __construct() { … … 72 72 $this->version = EUROPARCELCOM_WC_VERSION; 73 73 } else { 74 $this->version = '1.0. 8';74 $this->version = '1.0.9'; 75 75 } 76 76 $this->plugin_name = 'europarcel-com'; … … 86 86 * managing checkout functionality and locker selection. 87 87 * 88 * @since 1.0. 888 * @since 1.0.9 89 89 */ 90 90 private function load_dependencies() { … … 99 99 * WordPress hooks for AJAX functionality and checkout integration. 100 100 * 101 * @since 1.0. 8101 * @since 1.0.9 102 102 */ 103 103 private function define_woocommerce_hooks() { … … 115 115 // Classic checkout integration 116 116 add_action('woocommerce_review_order_after_shipping', array($this->checkout_handler, 'classic_checkout_button')); 117 118 // Locker selection validation hooks are registered in europarcel-com.php for early loading compatibility 117 119 } 118 120 … … 123 125 * so this method is available for future use if needed. 124 126 * 125 * @since 1.0. 8127 * @since 1.0.9 126 128 */ 127 129 public function run() { … … 132 134 * Get the plugin name 133 135 * 134 * @since 1.0. 8136 * @since 1.0.9 135 137 * @return string The plugin name 136 138 */ … … 142 144 * Get the plugin version 143 145 * 144 * @since 1.0. 8146 * @since 1.0.9 145 147 * @return string The plugin version number 146 148 */ -
europarcel-com/tags/1.0.9/includes/class-europarcel-request-data.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 29 29 * based on WooCommerce shipping instance configuration. 30 30 * 31 * @since 1.0. 831 * @since 1.0.9 32 32 * @package Europarcel 33 33 * @subpackage Europarcel/includes … … 39 39 * The WooCommerce shipping instance ID 40 40 * 41 * @since 1.0. 841 * @since 1.0.9 42 42 * @access private 43 43 * @var int $instance_id WooCommerce shipping method instance ID … … 51 51 * including carrier info, addresses, content details, and extra options. 52 52 * 53 * @since 1.0. 853 * @since 1.0.9 54 54 * @access private 55 55 * @var array $request_data Complete shipping request data … … 117 117 * parcel specifications. 118 118 * 119 * @since 1.0. 8119 * @since 1.0.9 120 120 * @param int $instance_id WooCommerce shipping method instance ID 121 121 * @param bool $allow_locker Whether to allow locker delivery services … … 176 176 * Set the carrier ID for the shipping request 177 177 * 178 * @since 1.0. 8178 * @since 1.0.9 179 179 * @param int $carrier_id The carrier ID from EuroParcel 180 180 */ … … 186 186 * Set the service ID for the shipping request 187 187 * 188 * @since 1.0. 8188 * @since 1.0.9 189 189 * @param int $service_id The service ID (1=standard, 2=locker) 190 190 */ … … 196 196 * Set the delivery address for the shipping request 197 197 * 198 * @since 1.0. 8198 * @since 1.0.9 199 199 * @param array $delivery_address Complete delivery address data 200 200 */ … … 208 208 * Returns the prepared shipping request data ready for EuroParcel API calls. 209 209 * 210 * @since 1.0. 8210 * @since 1.0.9 211 211 * @return array Complete shipping request data 212 212 */ -
europarcel-com/tags/1.0.9/includes/class-europarcel-shipping.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 29 29 * and both standard and locker delivery options. 30 30 * 31 * @since 1.0. 831 * @since 1.0.9 32 32 * @package Europarcel 33 33 * @subpackage Europarcel/includes … … 42 42 * instance ID, method title, description, and supported features. 43 43 * 44 * @since 1.0. 844 * @since 1.0.9 45 45 * @param int $instance_id WooCommerce shipping zone instance ID 46 46 */ … … 67 67 * and initializes the admin form fields. 68 68 * 69 * @since 1.0. 869 * @since 1.0.9 70 70 */ 71 71 public function init() { … … 87 87 * Dynamically loads customer information when API key is provided. 88 88 * 89 * @since 1.0. 889 * @since 1.0.9 90 90 */ 91 91 public function init_form_fields() { … … 299 299 * Validates nonce for security and processes each form field. 300 300 * 301 * @since 1.0. 8301 * @since 1.0.9 302 302 * @return bool True if options were saved successfully, false otherwise 303 303 */ … … 339 339 * Creates shipping rates for both standard and locker delivery options. 340 340 * 341 * @since 1.0. 8341 * @since 1.0.9 342 342 * @param array $package WooCommerce package data with contents and destination 343 343 */ -
europarcel-com/tags/1.0.9/languages/europarcel-com-ro_RO.po
r3478259 r3490045 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0. 8\n"6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.9\n" 7 7 "Report-Msgid-Bugs-To: cs@europarcel.com\n" 8 8 "POT-Creation-Date: 2026-01-17 19:00+0200\n" … … 349 349 msgstr "✓ Locker selectat -" 350 350 351 #: includes/class-europarcel-checkout.php 352 msgid "Please select a delivery locker before placing your order." 353 msgstr "Vă rugăm să selectați un locker de livrare înainte de a plasa comanda." 354 351 355 #: europarcel-com.php:142 352 356 msgid "Documentation" -
europarcel-com/tags/1.0.9/uninstall.php
r3478259 r3490045 10 10 * 11 11 * @link https://eawb.ro 12 * @since 1.0. 812 * @since 1.0.9 13 13 * 14 14 * @package Europarcel -
europarcel-com/trunk/README.txt
r3478259 r3490045 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 77 77 == Changelog == 78 78 79 = 1.0.9 = 80 * Added mandatory locker selection validation at checkout for both Classic and Blocks checkout 81 * Customers must now select a delivery locker before placing an order when locker shipping is chosen 82 79 83 = 1.0.8 = 80 84 * Fixed: Price fields now accept decimal values (e.g., 15.99) instead of integers only … … 107 111 == Upgrade Notice == 108 112 113 = 1.0.9 = 114 Locker selection is now mandatory at checkout when a locker shipping method is chosen. 115 109 116 = 1.0.8 = 110 117 Bug fix: Price fields now accept decimal values. -
europarcel-com/trunk/assets/css/europarcel-admin.css
r3478259 r3490045 6 6 * 7 7 * @package Europarcel 8 * @since 1.0. 88 * @since 1.0.9 9 9 */ 10 10 -
europarcel-com/trunk/assets/js/europarcel-admin.js
r3478259 r3490045 6 6 * 7 7 * @package Europarcel 8 * @since 1.0. 88 * @since 1.0.9 9 9 */ 10 10 -
europarcel-com/trunk/assets/js/europarcel-locker-selector.js
r3478259 r3490045 7 7 * 8 8 * @package Europarcel 9 * @since 1.0. 89 * @since 1.0.9 10 10 */ 11 11 … … 366 366 } 367 367 368 // Hide any locker validation error notices (don't remove — React manages these nodes) 369 document.querySelectorAll('.wc-block-store-notice, .woocommerce-error, .wc-block-components-notice-banner').forEach(function(notice) { 370 if (notice.textContent && notice.textContent.indexOf('locker') !== -1) { 371 notice.style.display = 'none'; 372 } 373 }); 374 368 375 displayLockerInfo(locker, true); 369 376 updateWooCommerceFields(locker); -
europarcel-com/trunk/assets/js/europarcel-modal.js
r3478259 r3490045 7 7 * @package Europarcel 8 8 * @subpackage Assets/JavaScript 9 * @since 1.0. 89 * @since 1.0.9 10 10 */ 11 11 … … 16 16 * EuroParcel Modal object 17 17 * 18 * @since 1.0. 818 * @since 1.0.9 19 19 */ 20 20 window.EuroparcelModal = { … … 26 26 * Handles both desktop and mobile responsive display. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @param {string} iframeUrl - The URL to load in the iframe 30 30 */ … … 92 92 * Configures click handlers, escape key handler, and other modal interactions. 93 93 * 94 * @since 1.0. 894 * @since 1.0.9 95 95 * @param {HTMLElement} modal - The modal element 96 96 * @param {boolean} isMobile - Whether the device is mobile … … 141 141 * Cleans up event listeners to prevent memory leaks. 142 142 * 143 * @since 1.0. 8143 * @since 1.0.9 144 144 */ 145 145 close: function() { -
europarcel-com/trunk/europarcel-com.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * @package Europarcel 13 13 * … … 15 15 * Plugin Name: EuroParcel Integration for WooCommerce 16 16 * Description: Connect your WooCommerce store with eAWB shipping platform 17 * Version: 1.0. 817 * Version: 1.0.9 18 18 * Author: EuroParcel 19 19 * Author URI: https://eawb.ro/ … … 31 31 } 32 32 33 define('EUROPARCELCOM_WC_VERSION', '1.0. 8');33 define('EUROPARCELCOM_WC_VERSION', '1.0.9'); 34 34 35 35 /** … … 65 65 * Declare compatibility with WooCommerce High-Performance Order Storage (HPOS) 66 66 * 67 * @since 1.0. 867 * @since 1.0.9 68 68 */ 69 69 add_action('before_woocommerce_init', function() { … … 76 76 * Initialize the shipping method 77 77 * 78 * @since 1.0. 878 * @since 1.0.9 79 79 */ 80 80 add_action('woocommerce_shipping_init', 'europarcelcom_wc_shipping_init'); … … 83 83 * Load the shipping method class 84 84 * 85 * @since 1.0. 885 * @since 1.0.9 86 86 */ 87 87 function europarcelcom_wc_shipping_init() { … … 95 95 * Register the shipping method with WooCommerce 96 96 * 97 * @since 1.0. 897 * @since 1.0.9 98 98 * @param array $methods Existing shipping methods 99 99 * @return array Updated shipping methods … … 107 107 * Enqueue admin styles and scripts 108 108 * 109 * @since 1.0. 8109 * @since 1.0.9 110 110 */ 111 111 add_action('admin_enqueue_scripts', function () { 112 112 $current_screen = get_current_screen(); 113 113 if (is_admin() && $current_screen && strpos($current_screen->id, 'woocommerce_page_wc-settings') !== false) { 114 wp_enqueue_style('europarcel-admin', plugins_url('assets/css/europarcel-admin.css', __FILE__), array(), '1.0. 8');115 wp_enqueue_script('europarcel-admin', plugins_url('assets/js/europarcel-admin.js', __FILE__), array('jquery', 'select2'), '1.0. 8', true);114 wp_enqueue_style('europarcel-admin', plugins_url('assets/css/europarcel-admin.css', __FILE__), array(), '1.0.9'); 115 wp_enqueue_script('europarcel-admin', plugins_url('assets/js/europarcel-admin.js', __FILE__), array('jquery', 'select2'), '1.0.9', true); 116 116 } 117 117 }); … … 120 120 * Initialize the main plugin class 121 121 * 122 * @since 1.0. 8122 * @since 1.0.9 123 123 */ 124 124 function europarcelcom_wc_plugin_run() { … … 131 131 132 132 /** 133 * Locker selection validation - Classic checkout 134 * 135 * @since 1.0.9 136 */ 137 add_action('woocommerce_after_checkout_validation', function($data, $errors) { 138 $message = EuroParcelComWC_Checkout::check_locker_selection(); 139 if ($message) { 140 $errors->add('europarcel_locker_required', $message); 141 } 142 }, 10, 2); 143 144 /** 145 * Locker selection validation - Blocks checkout (Store API) 146 * 147 * @since 1.0.9 148 */ 149 add_action('woocommerce_store_api_checkout_update_order_from_request', function($order, $request) { 150 $message = EuroParcelComWC_Checkout::check_locker_selection(); 151 if ($message) { 152 throw new \Automattic\WooCommerce\StoreApi\Exceptions\RouteException( 153 'europarcel_locker_required', 154 $message, 155 400 156 ); 157 } 158 }, 10, 2); 159 160 /** 133 161 * Add plugin row meta links (Documentation, Video Tutorial) 134 162 * 135 * @since 1.0. 8163 * @since 1.0.9 136 164 * @param array $links Existing meta links 137 165 * @param string $file Plugin file path -
europarcel-com/trunk/includes/class-europarcel-activator.php
r3478259 r3490045 9 9 * 10 10 * @link https://europarcel.com 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 20 20 * This class defines all code necessary to run during the plugin's activation. 21 21 * 22 * @since 1.0. 822 * @since 1.0.9 23 23 * @package Europarcel 24 24 * @subpackage Europarcel/includes … … 32 32 * Handles any setup tasks required when the plugin is activated. 33 33 * 34 * @since 1.0. 834 * @since 1.0.9 35 35 */ 36 36 public static function activate() { 37 37 // Store plugin version 38 38 if (!get_option('EUROPARCELCOM_WC_VERSION')) { 39 add_option('EUROPARCELCOM_WC_VERSION', '1.0. 8');39 add_option('EUROPARCELCOM_WC_VERSION', '1.0.9'); 40 40 } 41 41 -
europarcel-com/trunk/includes/class-europarcel-checkout.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 28 28 * for locker selection and shipping updates. 29 29 * 30 * @since 1.0. 830 * @since 1.0.9 31 31 * @package Europarcel 32 32 * @subpackage Europarcel/includes … … 38 38 * Whether the current checkout is blocks-based 39 39 * 40 * @since 1.0. 840 * @since 1.0.9 41 41 * @access private 42 42 * @var bool $is_blocks_checkout True if blocks checkout detected … … 50 50 * via smart_init method to detect checkout type first. 51 51 * 52 * @since 1.0. 852 * @since 1.0.9 53 53 */ 54 54 public function __construct() { … … 62 62 * or Blocks-based and initializes the appropriate functionality. 63 63 * 64 * @since 1.0. 864 * @since 1.0.9 65 65 */ 66 66 public function smart_init() { … … 83 83 * Enqueues scripts and localizes data for WooCommerce Blocks checkout. 84 84 * 85 * @since 1.0. 885 * @since 1.0.9 86 86 */ 87 87 private function init_blocks_checkout() { … … 96 96 * Enqueues scripts and localizes data for WooCommerce Classic checkout. 97 97 * 98 * @since 1.0. 898 * @since 1.0.9 99 99 */ 100 100 private function init_classic_checkout() { … … 110 110 * and checkout type information for JavaScript usage. 111 111 * 112 * @since 1.0. 8112 * @since 1.0.9 113 113 */ 114 114 private function localize_script_data() { … … 191 191 * Validates nonce and returns carrier data via JSON response. 192 192 * 193 * @since 1.0. 8193 * @since 1.0.9 194 194 */ 195 195 public function wp_ajax_europarcelcomwc_get_locker_carriers() { … … 221 221 * Validates nonce and sanitizes all input data. 222 222 * 223 * @since 1.0. 8223 * @since 1.0.9 224 224 */ 225 225 public function wp_ajax_europarcelcomwc_update_locker_shipping() { … … 271 271 272 272 /** 273 * Check if the chosen shipping method requires a locker and if one is selected 274 * 275 * Shared validation logic used by both Classic and Blocks checkout. 276 * Returns null if validation passes, or an error message string if it fails. 277 * 278 * @since 1.0.9 279 * @return string|null Error message if locker not selected, null if valid 280 */ 281 public static function check_locker_selection() { 282 $chosen_methods = WC()->session->get('chosen_shipping_methods', []); 283 284 if (empty($chosen_methods)) { 285 return null; 286 } 287 288 $is_locker = false; 289 $instance_id = null; 290 291 foreach ($chosen_methods as $method) { 292 if (strpos($method, 'europarcelcom_wc_shipping') !== false && strpos($method, '_locker') !== false) { 293 $is_locker = true; 294 $parts = explode(':', $method); 295 if (isset($parts[1]) && preg_match('/^(\d+)/', $parts[1], $matches)) { 296 $instance_id = $matches[1]; 297 } 298 break; 299 } 300 } 301 302 if (!$is_locker) { 303 return null; 304 } 305 306 // Check session locker_info 307 $locker_info = WC()->session->get('locker_info'); 308 if (!empty($locker_info) && !empty($locker_info['locker_id'])) { 309 if ($instance_id === null || (isset($locker_info['instance_id']) && $locker_info['instance_id'] == $instance_id)) { 310 return null; 311 } 312 } 313 314 // Check saved user lockers 315 $user_id = get_current_user_id(); 316 if ($user_id && $instance_id !== null) { 317 $user_lockers = get_user_meta($user_id, 'europarcelcom_wc_carrier_lockers', true); 318 if (is_array($user_lockers) && isset($user_lockers[$instance_id]) && !empty($user_lockers[$instance_id]['locker_id'])) { 319 return null; 320 } 321 } 322 323 return __('Please select a delivery locker before placing your order.', 'europarcel-com'); 324 } 325 326 /** 327 * Validate locker selection for classic checkout 328 * 329 * Hooked to woocommerce_after_checkout_validation. 330 * 331 * @since 1.0.9 332 * @param array $data Checkout posted data 333 * @param WP_Error $errors Validation errors object 334 */ 335 public function validate_checkout_locker($data, $errors) { 336 $message = self::check_locker_selection(); 337 if ($message) { 338 $errors->add('europarcel_locker_required', $message); 339 } 340 } 341 342 /** 343 * Validate locker selection for blocks checkout 344 * 345 * Hooked to woocommerce_store_api_checkout_update_order_from_request. 346 * 347 * @since 1.0.9 348 * @param WC_Order $order The order being created 349 * @param \Automattic\WooCommerce\StoreApi\Routes\V1\Checkout $request The checkout request 350 */ 351 public function validate_blocks_checkout_locker($order, $request) { 352 $message = self::check_locker_selection(); 353 if ($message) { 354 throw new \Automattic\WooCommerce\StoreApi\Exceptions\RouteException( 355 'europarcel_locker_required', 356 $message, 357 400 358 ); 359 } 360 } 361 362 /** 273 363 * Display locker selection button for classic checkout 274 364 * … … 276 366 * the locker selection button in classic checkout when applicable. 277 367 * 278 * @since 1.0. 8368 * @since 1.0.9 279 369 */ 280 370 public function classic_checkout_button() { -
europarcel-com/trunk/includes/class-europarcel-constants.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 27 27 * shipping services for both admin configuration and API requests. 28 28 * 29 * @since 1.0. 829 * @since 1.0.9 30 30 * @package Europarcel 31 31 * @subpackage Europarcel/includes … … 41 41 * All strings are internationalized for translation support. 42 42 * 43 * @since 1.0. 843 * @since 1.0.9 44 44 * @return array Array of service keys and their translated display names 45 45 */ … … 69 69 * - 2: Locker delivery (home to locker) 70 70 * 71 * @since 1.0. 871 * @since 1.0.9 72 72 * @param array|string $services Array of service keys to convert (or string for backward compatibility) 73 73 * @return array Array of carrier configuration arrays -
europarcel-com/trunk/includes/class-europarcel-customer.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 31 31 * and carrier service availability. 32 32 * 33 * @since 1.0. 833 * @since 1.0.9 34 34 * @package Europarcel 35 35 * @subpackage Europarcel/includes … … 41 41 * The WooCommerce shipping instance ID 42 42 * 43 * @since 1.0. 843 * @since 1.0.9 44 44 * @access private 45 45 * @var int $instance_id WooCommerce shipping method instance ID … … 50 50 * The shipping method settings 51 51 * 52 * @since 1.0. 852 * @since 1.0.9 53 53 * @access public 54 54 * @var array $settings WooCommerce shipping method settings … … 62 62 * configuration and loads the associated settings. 63 63 * 64 * @since 1.0. 864 * @since 1.0.9 65 65 * @param int $instance_id WooCommerce shipping method instance ID 66 66 */ … … 76 76 * the EuroParcel API including name, contact details, and account status. 77 77 * 78 * @since 1.0. 878 * @since 1.0.9 79 79 * @return array|null Customer account data or null on failure 80 80 */ … … 100 100 * EuroParcel account for use in shipping calculations. 101 101 * 102 * @since 1.0. 8102 * @since 1.0.9 103 103 * @return array Array of billing addresses with ID as key and formatted address as value 104 104 */ … … 138 138 * EuroParcel account for use as pickup locations. 139 139 * 140 * @since 1.0. 8140 * @since 1.0.9 141 141 * @return array Array of pickup addresses with ID as key and formatted address as value 142 142 */ … … 177 177 * and destination address. 178 178 * 179 * @since 1.0. 8179 * @since 1.0.9 180 180 * @param array $package WooCommerce package data with destination details 181 181 * @param bool $allow_locker Whether to include locker delivery options … … 262 262 * Used with usort() to arrange services from lowest to highest cost. 263 263 * 264 * @since 1.0. 8264 * @since 1.0.9 265 265 * @param array $first_service First service for comparison 266 266 * @param array $second_service Second service for comparison … … 280 280 * based on the configured available services. 281 281 * 282 * @since 1.0. 8282 * @since 1.0.9 283 283 * @return array Array of carrier IDs that support locker delivery 284 284 */ … … 316 316 * based on the configured available services. 317 317 * 318 * @since 1.0. 8318 * @since 1.0.9 319 319 * @return array|false Array of carrier IDs that support standard delivery or false if none available 320 320 */ -
europarcel-com/trunk/includes/class-europarcel-deactivator.php
r3478259 r3490045 9 9 * 10 10 * @link https://europarcel.com 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 20 20 * This class defines all code necessary to run during the plugin's deactivation. 21 21 * 22 * @since 1.0. 822 * @since 1.0.9 23 23 * @package Europarcel 24 24 * @subpackage Europarcel/includes … … 32 32 * Handles any cleanup tasks required when the plugin is deactivated. 33 33 * 34 * @since 1.0. 834 * @since 1.0.9 35 35 */ 36 36 public static function deactivate() { -
europarcel-com/trunk/includes/class-europarcel-http-request.php
r3478259 r3490045 8 8 * 9 9 * @link https://eawb.ro 10 * @since 1.0. 810 * @since 1.0.9 11 11 * 12 12 * @package Europarcel … … 26 26 * for both GET and POST requests with proper error handling. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @package Europarcel 30 30 * @subpackage Europarcel/includes … … 36 36 * The shipping method instance ID 37 37 * 38 * @since 1.0. 838 * @since 1.0.9 39 39 * @access private 40 40 * @var int $instance_id WooCommerce shipping method instance ID … … 48 48 * shipping method settings and API key. 49 49 * 50 * @since 1.0. 850 * @since 1.0.9 51 51 * @param int $instance_id WooCommerce shipping method instance ID 52 52 */ … … 60 60 * query parameters and handles the response. 61 61 * 62 * @since 1.0. 862 * @since 1.0.9 63 63 * @param string $function API endpoint function name 64 64 * @param array $data Optional query parameters … … 89 89 * the provided data and handles the response. 90 90 * 91 * @since 1.0. 891 * @since 1.0.9 92 92 * @param string $function API endpoint function name 93 93 * @param array $data POST data to send … … 115 115 * Throws exceptions for various error conditions. 116 116 * 117 * @since 1.0. 8117 * @since 1.0.9 118 118 * @param array|WP_Error $response WordPress HTTP API response 119 119 * @return array Decoded JSON response … … 155 155 * the headers required for EuroParcel API authentication. 156 156 * 157 * @since 1.0. 8157 * @since 1.0.9 158 158 * @return array HTTP headers array with API key 159 159 */ -
europarcel-com/trunk/includes/class-europarcel-main.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 26 26 * both classic and blocks checkout types. 27 27 * 28 * @since 1.0. 828 * @since 1.0.9 29 29 * @package Europarcel 30 30 * @subpackage Europarcel/includes … … 36 36 * The plugin name 37 37 * 38 * @since 1.0. 838 * @since 1.0.9 39 39 * @access protected 40 40 * @var string $plugin_name The plugin identifier name … … 45 45 * The plugin version 46 46 * 47 * @since 1.0. 847 * @since 1.0.9 48 48 * @access protected 49 49 * @var string $version The current plugin version … … 54 54 * The checkout handler instance 55 55 * 56 * @since 1.0. 856 * @since 1.0.9 57 57 * @access protected 58 58 * @var EuroparcelCheckout $checkout_handler Handles checkout functionality … … 66 66 * and defines WooCommerce hooks for checkout functionality. 67 67 * 68 * @since 1.0. 868 * @since 1.0.9 69 69 */ 70 70 public function __construct() { … … 72 72 $this->version = EUROPARCELCOM_WC_VERSION; 73 73 } else { 74 $this->version = '1.0. 8';74 $this->version = '1.0.9'; 75 75 } 76 76 $this->plugin_name = 'europarcel-com'; … … 86 86 * managing checkout functionality and locker selection. 87 87 * 88 * @since 1.0. 888 * @since 1.0.9 89 89 */ 90 90 private function load_dependencies() { … … 99 99 * WordPress hooks for AJAX functionality and checkout integration. 100 100 * 101 * @since 1.0. 8101 * @since 1.0.9 102 102 */ 103 103 private function define_woocommerce_hooks() { … … 115 115 // Classic checkout integration 116 116 add_action('woocommerce_review_order_after_shipping', array($this->checkout_handler, 'classic_checkout_button')); 117 118 // Locker selection validation hooks are registered in europarcel-com.php for early loading compatibility 117 119 } 118 120 … … 123 125 * so this method is available for future use if needed. 124 126 * 125 * @since 1.0. 8127 * @since 1.0.9 126 128 */ 127 129 public function run() { … … 132 134 * Get the plugin name 133 135 * 134 * @since 1.0. 8136 * @since 1.0.9 135 137 * @return string The plugin name 136 138 */ … … 142 144 * Get the plugin version 143 145 * 144 * @since 1.0. 8146 * @since 1.0.9 145 147 * @return string The plugin version number 146 148 */ -
europarcel-com/trunk/includes/class-europarcel-request-data.php
r3478259 r3490045 9 9 * 10 10 * @link https://eawb.ro 11 * @since 1.0. 811 * @since 1.0.9 12 12 * 13 13 * @package Europarcel … … 29 29 * based on WooCommerce shipping instance configuration. 30 30 * 31 * @since 1.0. 831 * @since 1.0.9 32 32 * @package Europarcel 33 33 * @subpackage Europarcel/includes … … 39 39 * The WooCommerce shipping instance ID 40 40 * 41 * @since 1.0. 841 * @since 1.0.9 42 42 * @access private 43 43 * @var int $instance_id WooCommerce shipping method instance ID … … 51 51 * including carrier info, addresses, content details, and extra options. 52 52 * 53 * @since 1.0. 853 * @since 1.0.9 54 54 * @access private 55 55 * @var array $request_data Complete shipping request data … … 117 117 * parcel specifications. 118 118 * 119 * @since 1.0. 8119 * @since 1.0.9 120 120 * @param int $instance_id WooCommerce shipping method instance ID 121 121 * @param bool $allow_locker Whether to allow locker delivery services … … 176 176 * Set the carrier ID for the shipping request 177 177 * 178 * @since 1.0. 8178 * @since 1.0.9 179 179 * @param int $carrier_id The carrier ID from EuroParcel 180 180 */ … … 186 186 * Set the service ID for the shipping request 187 187 * 188 * @since 1.0. 8188 * @since 1.0.9 189 189 * @param int $service_id The service ID (1=standard, 2=locker) 190 190 */ … … 196 196 * Set the delivery address for the shipping request 197 197 * 198 * @since 1.0. 8198 * @since 1.0.9 199 199 * @param array $delivery_address Complete delivery address data 200 200 */ … … 208 208 * Returns the prepared shipping request data ready for EuroParcel API calls. 209 209 * 210 * @since 1.0. 8210 * @since 1.0.9 211 211 * @return array Complete shipping request data 212 212 */ -
europarcel-com/trunk/includes/class-europarcel-shipping.php
r3478259 r3490045 13 13 * 14 14 * @link https://eawb.ro 15 * @since 1.0. 815 * @since 1.0.9 16 16 * 17 17 * @package Europarcel … … 29 29 * and both standard and locker delivery options. 30 30 * 31 * @since 1.0. 831 * @since 1.0.9 32 32 * @package Europarcel 33 33 * @subpackage Europarcel/includes … … 42 42 * instance ID, method title, description, and supported features. 43 43 * 44 * @since 1.0. 844 * @since 1.0.9 45 45 * @param int $instance_id WooCommerce shipping zone instance ID 46 46 */ … … 67 67 * and initializes the admin form fields. 68 68 * 69 * @since 1.0. 869 * @since 1.0.9 70 70 */ 71 71 public function init() { … … 87 87 * Dynamically loads customer information when API key is provided. 88 88 * 89 * @since 1.0. 889 * @since 1.0.9 90 90 */ 91 91 public function init_form_fields() { … … 299 299 * Validates nonce for security and processes each form field. 300 300 * 301 * @since 1.0. 8301 * @since 1.0.9 302 302 * @return bool True if options were saved successfully, false otherwise 303 303 */ … … 339 339 * Creates shipping rates for both standard and locker delivery options. 340 340 * 341 * @since 1.0. 8341 * @since 1.0.9 342 342 * @param array $package WooCommerce package data with contents and destination 343 343 */ -
europarcel-com/trunk/languages/europarcel-com-ro_RO.po
r3478259 r3490045 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0. 8\n"6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.9\n" 7 7 "Report-Msgid-Bugs-To: cs@europarcel.com\n" 8 8 "POT-Creation-Date: 2026-01-17 19:00+0200\n" … … 349 349 msgstr "✓ Locker selectat -" 350 350 351 #: includes/class-europarcel-checkout.php 352 msgid "Please select a delivery locker before placing your order." 353 msgstr "Vă rugăm să selectați un locker de livrare înainte de a plasa comanda." 354 351 355 #: europarcel-com.php:142 352 356 msgid "Documentation" -
europarcel-com/trunk/uninstall.php
r3478259 r3490045 10 10 * 11 11 * @link https://eawb.ro 12 * @since 1.0. 812 * @since 1.0.9 13 13 * 14 14 * @package Europarcel
Note: See TracChangeset
for help on using the changeset viewer.