Plugin Directory

Changeset 3490045


Ignore:
Timestamp:
03/24/2026 01:14:51 PM (5 days ago)
Author:
europarcelcom
Message:

Version 1.0.9: Added mandatory locker selection validation at checkout for both Classic and Blocks checkout

Location:
europarcel-com
Files:
36 edited
1 copied

Legend:

Unmodified
Added
Removed
  • europarcel-com/tags/1.0.9/README.txt

    r3478259 r3490045  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.8
     7Stable tag: 1.0.9
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    7777== Changelog ==
    7878
     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
    7983= 1.0.8 =
    8084* Fixed: Price fields now accept decimal values (e.g., 15.99) instead of integers only
     
    107111== Upgrade Notice ==
    108112
     113= 1.0.9 =
     114Locker selection is now mandatory at checkout when a locker shipping method is chosen.
     115
    109116= 1.0.8 =
    110117Bug fix: Price fields now accept decimal values.
  • europarcel-com/tags/1.0.9/assets/css/europarcel-admin.css

    r3478259 r3490045  
    66 *
    77 * @package    Europarcel
    8  * @since      1.0.8
     8 * @since      1.0.9
    99 */
    1010
  • europarcel-com/tags/1.0.9/assets/js/europarcel-admin.js

    r3478259 r3490045  
    66 *
    77 * @package    Europarcel
    8  * @since      1.0.8
     8 * @since      1.0.9
    99 */
    1010
  • europarcel-com/tags/1.0.9/assets/js/europarcel-locker-selector.js

    r3478259 r3490045  
    77 *
    88 * @package    Europarcel
    9  * @since      1.0.8
     9 * @since      1.0.9
    1010 */
    1111
     
    366366                }
    367367
     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
    368375                displayLockerInfo(locker, true);
    369376                updateWooCommerceFields(locker);
  • europarcel-com/tags/1.0.9/assets/js/europarcel-modal.js

    r3478259 r3490045  
    77 * @package    Europarcel
    88 * @subpackage Assets/JavaScript
    9  * @since      1.0.8
     9 * @since      1.0.9
    1010 */
    1111
     
    1616     * EuroParcel Modal object
    1717     *
    18      * @since 1.0.8
     18     * @since 1.0.9
    1919     */
    2020    window.EuroparcelModal = {
     
    2626         * Handles both desktop and mobile responsive display.
    2727         *
    28          * @since 1.0.8
     28         * @since 1.0.9
    2929         * @param {string} iframeUrl - The URL to load in the iframe
    3030         */
     
    9292         * Configures click handlers, escape key handler, and other modal interactions.
    9393         *
    94          * @since 1.0.8
     94         * @since 1.0.9
    9595         * @param {HTMLElement} modal - The modal element
    9696         * @param {boolean} isMobile - Whether the device is mobile
     
    141141         * Cleans up event listeners to prevent memory leaks.
    142142         *
    143          * @since 1.0.8
     143         * @since 1.0.9
    144144         */
    145145        close: function() {
  • europarcel-com/tags/1.0.9/europarcel-com.php

    r3478259 r3490045  
    99 *
    1010 * @link              https://eawb.ro
    11  * @since             1.0.8
     11 * @since             1.0.9
    1212 * @package           Europarcel
    1313 *
     
    1515 * Plugin Name:       EuroParcel Integration for WooCommerce
    1616 * Description:       Connect your WooCommerce store with eAWB shipping platform
    17  * Version:           1.0.8
     17 * Version:           1.0.9
    1818 * Author:            EuroParcel
    1919 * Author URI:        https://eawb.ro/
     
    3131}
    3232
    33 define('EUROPARCELCOM_WC_VERSION', '1.0.8');
     33define('EUROPARCELCOM_WC_VERSION', '1.0.9');
    3434
    3535/**
     
    6565 * Declare compatibility with WooCommerce High-Performance Order Storage (HPOS)
    6666 *
    67  * @since    1.0.8
     67 * @since    1.0.9
    6868 */
    6969add_action('before_woocommerce_init', function() {
     
    7676 * Initialize the shipping method
    7777 *
    78  * @since    1.0.8
     78 * @since    1.0.9
    7979 */
    8080add_action('woocommerce_shipping_init', 'europarcelcom_wc_shipping_init');
     
    8383 * Load the shipping method class
    8484 *
    85  * @since    1.0.8
     85 * @since    1.0.9
    8686 */
    8787function europarcelcom_wc_shipping_init() {
     
    9595 * Register the shipping method with WooCommerce
    9696 *
    97  * @since    1.0.8
     97 * @since    1.0.9
    9898 * @param    array    $methods    Existing shipping methods
    9999 * @return   array                Updated shipping methods
     
    107107 * Enqueue admin styles and scripts
    108108 *
    109  * @since    1.0.8
     109 * @since    1.0.9
    110110 */
    111111add_action('admin_enqueue_scripts', function () {
    112112    $current_screen = get_current_screen();
    113113    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);
    116116    }
    117117});
     
    120120 * Initialize the main plugin class
    121121 *
    122  * @since    1.0.8
     122 * @since    1.0.9
    123123 */
    124124function europarcelcom_wc_plugin_run() {
     
    131131
    132132/**
     133 * Locker selection validation - Classic checkout
     134 *
     135 * @since    1.0.9
     136 */
     137add_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 */
     149add_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/**
    133161 * Add plugin row meta links (Documentation, Video Tutorial)
    134162 *
    135  * @since    1.0.8
     163 * @since    1.0.9
    136164 * @param    array     $links    Existing meta links
    137165 * @param    string    $file     Plugin file path
  • europarcel-com/tags/1.0.9/includes/class-europarcel-activator.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://europarcel.com
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2020 * This class defines all code necessary to run during the plugin's activation.
    2121 *
    22  * @since      1.0.8
     22 * @since      1.0.9
    2323 * @package    Europarcel
    2424 * @subpackage Europarcel/includes
     
    3232     * Handles any setup tasks required when the plugin is activated.
    3333     *
    34      * @since    1.0.8
     34     * @since    1.0.9
    3535     */
    3636    public static function activate() {
    3737        // Store plugin version
    3838        if (!get_option('EUROPARCELCOM_WC_VERSION')) {
    39             add_option('EUROPARCELCOM_WC_VERSION', '1.0.8');
     39            add_option('EUROPARCELCOM_WC_VERSION', '1.0.9');
    4040        }
    4141       
  • europarcel-com/tags/1.0.9/includes/class-europarcel-checkout.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2828 * for locker selection and shipping updates.
    2929 *
    30  * @since      1.0.8
     30 * @since      1.0.9
    3131 * @package    Europarcel
    3232 * @subpackage Europarcel/includes
     
    3838     * Whether the current checkout is blocks-based
    3939     *
    40      * @since    1.0.8
     40     * @since    1.0.9
    4141     * @access   private
    4242     * @var      bool    $is_blocks_checkout    True if blocks checkout detected
     
    5050     * via smart_init method to detect checkout type first.
    5151     *
    52      * @since    1.0.8
     52     * @since    1.0.9
    5353     */
    5454    public function __construct() {
     
    6262     * or Blocks-based and initializes the appropriate functionality.
    6363     *
    64      * @since    1.0.8
     64     * @since    1.0.9
    6565     */
    6666    public function smart_init() {
     
    8383     * Enqueues scripts and localizes data for WooCommerce Blocks checkout.
    8484     *
    85      * @since    1.0.8
     85     * @since    1.0.9
    8686     */
    8787    private function init_blocks_checkout() {
     
    9696     * Enqueues scripts and localizes data for WooCommerce Classic checkout.
    9797     *
    98      * @since    1.0.8
     98     * @since    1.0.9
    9999     */
    100100    private function init_classic_checkout() {
     
    110110     * and checkout type information for JavaScript usage.
    111111     *
    112      * @since    1.0.8
     112     * @since    1.0.9
    113113     */
    114114    private function localize_script_data() {
     
    191191     * Validates nonce and returns carrier data via JSON response.
    192192     *
    193      * @since    1.0.8
     193     * @since    1.0.9
    194194     */
    195195    public function wp_ajax_europarcelcomwc_get_locker_carriers() {
     
    221221     * Validates nonce and sanitizes all input data.
    222222     *
    223      * @since    1.0.8
     223     * @since    1.0.9
    224224     */
    225225    public function wp_ajax_europarcelcomwc_update_locker_shipping() {
     
    271271
    272272    /**
     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    /**
    273363     * Display locker selection button for classic checkout
    274364     *
     
    276366     * the locker selection button in classic checkout when applicable.
    277367     *
    278      * @since    1.0.8
     368     * @since    1.0.9
    279369     */
    280370    public function classic_checkout_button() {
  • europarcel-com/tags/1.0.9/includes/class-europarcel-constants.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2727 * shipping services for both admin configuration and API requests.
    2828 *
    29  * @since      1.0.8
     29 * @since      1.0.9
    3030 * @package    Europarcel
    3131 * @subpackage Europarcel/includes
     
    4141     * All strings are internationalized for translation support.
    4242     *
    43      * @since    1.0.8
     43     * @since    1.0.9
    4444     * @return   array    Array of service keys and their translated display names
    4545     */
     
    6969     * - 2: Locker delivery (home to locker)
    7070     *
    71      * @since    1.0.8
     71     * @since    1.0.9
    7272     * @param    array|string    $services    Array of service keys to convert (or string for backward compatibility)
    7373     * @return   array    Array of carrier configuration arrays
  • europarcel-com/tags/1.0.9/includes/class-europarcel-customer.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    3131 * and carrier service availability.
    3232 *
    33  * @since      1.0.8
     33 * @since      1.0.9
    3434 * @package    Europarcel
    3535 * @subpackage Europarcel/includes
     
    4141     * The WooCommerce shipping instance ID
    4242     *
    43      * @since    1.0.8
     43     * @since    1.0.9
    4444     * @access   private
    4545     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    5050     * The shipping method settings
    5151     *
    52      * @since    1.0.8
     52     * @since    1.0.9
    5353     * @access   public
    5454     * @var      array    $settings    WooCommerce shipping method settings
     
    6262     * configuration and loads the associated settings.
    6363     *
    64      * @since    1.0.8
     64     * @since    1.0.9
    6565     * @param    int    $instance_id    WooCommerce shipping method instance ID
    6666     */
     
    7676     * the EuroParcel API including name, contact details, and account status.
    7777     *
    78      * @since    1.0.8
     78     * @since    1.0.9
    7979     * @return   array|null    Customer account data or null on failure
    8080     */
     
    100100     * EuroParcel account for use in shipping calculations.
    101101     *
    102      * @since    1.0.8
     102     * @since    1.0.9
    103103     * @return   array    Array of billing addresses with ID as key and formatted address as value
    104104     */
     
    138138     * EuroParcel account for use as pickup locations.
    139139     *
    140      * @since    1.0.8
     140     * @since    1.0.9
    141141     * @return   array    Array of pickup addresses with ID as key and formatted address as value
    142142     */
     
    177177     * and destination address.
    178178     *
    179      * @since    1.0.8
     179     * @since    1.0.9
    180180     * @param    array    $package        WooCommerce package data with destination details
    181181     * @param    bool     $allow_locker   Whether to include locker delivery options
     
    262262     * Used with usort() to arrange services from lowest to highest cost.
    263263     *
    264      * @since    1.0.8
     264     * @since    1.0.9
    265265     * @param    array    $first_service     First service for comparison
    266266     * @param    array    $second_service    Second service for comparison
     
    280280     * based on the configured available services.
    281281     *
    282      * @since    1.0.8
     282     * @since    1.0.9
    283283     * @return   array    Array of carrier IDs that support locker delivery
    284284     */
     
    316316     * based on the configured available services.
    317317     *
    318      * @since    1.0.8
     318     * @since    1.0.9
    319319     * @return   array|false    Array of carrier IDs that support standard delivery or false if none available
    320320     */
  • europarcel-com/tags/1.0.9/includes/class-europarcel-deactivator.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://europarcel.com
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2020 * This class defines all code necessary to run during the plugin's deactivation.
    2121 *
    22  * @since      1.0.8
     22 * @since      1.0.9
    2323 * @package    Europarcel
    2424 * @subpackage Europarcel/includes
     
    3232     * Handles any cleanup tasks required when the plugin is deactivated.
    3333     *
    34      * @since    1.0.8
     34     * @since    1.0.9
    3535     */
    3636    public static function deactivate() {
  • europarcel-com/tags/1.0.9/includes/class-europarcel-http-request.php

    r3478259 r3490045  
    88 *
    99 * @link       https://eawb.ro
    10  * @since      1.0.8
     10 * @since      1.0.9
    1111 *
    1212 * @package    Europarcel
     
    2626 * for both GET and POST requests with proper error handling.
    2727 *
    28  * @since      1.0.8
     28 * @since      1.0.9
    2929 * @package    Europarcel
    3030 * @subpackage Europarcel/includes
     
    3636     * The shipping method instance ID
    3737     *
    38      * @since    1.0.8
     38     * @since    1.0.9
    3939     * @access   private
    4040     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    4848     * shipping method settings and API key.
    4949     *
    50      * @since    1.0.8
     50     * @since    1.0.9
    5151     * @param    int    $instance_id    WooCommerce shipping method instance ID
    5252     */
     
    6060     * query parameters and handles the response.
    6161     *
    62      * @since    1.0.8
     62     * @since    1.0.9
    6363     * @param    string    $function    API endpoint function name
    6464     * @param    array     $data        Optional query parameters
     
    8989     * the provided data and handles the response.
    9090     *
    91      * @since    1.0.8
     91     * @since    1.0.9
    9292     * @param    string    $function    API endpoint function name
    9393     * @param    array     $data        POST data to send
     
    115115     * Throws exceptions for various error conditions.
    116116     *
    117      * @since    1.0.8
     117     * @since    1.0.9
    118118     * @param    array|WP_Error    $response    WordPress HTTP API response
    119119     * @return   array             Decoded JSON response
     
    155155     * the headers required for EuroParcel API authentication.
    156156     *
    157      * @since    1.0.8
     157     * @since    1.0.9
    158158     * @return   array    HTTP headers array with API key
    159159     */
  • europarcel-com/tags/1.0.9/includes/class-europarcel-main.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2626 * both classic and blocks checkout types.
    2727 *
    28  * @since      1.0.8
     28 * @since      1.0.9
    2929 * @package    Europarcel
    3030 * @subpackage Europarcel/includes
     
    3636     * The plugin name
    3737     *
    38      * @since    1.0.8
     38     * @since    1.0.9
    3939     * @access   protected
    4040     * @var      string    $plugin_name    The plugin identifier name
     
    4545     * The plugin version
    4646     *
    47      * @since    1.0.8
     47     * @since    1.0.9
    4848     * @access   protected
    4949     * @var      string    $version    The current plugin version
     
    5454     * The checkout handler instance
    5555     *
    56      * @since    1.0.8
     56     * @since    1.0.9
    5757     * @access   protected
    5858     * @var      EuroparcelCheckout    $checkout_handler    Handles checkout functionality
     
    6666     * and defines WooCommerce hooks for checkout functionality.
    6767     *
    68      * @since    1.0.8
     68     * @since    1.0.9
    6969     */
    7070    public function __construct() {
     
    7272            $this->version = EUROPARCELCOM_WC_VERSION;
    7373        } else {
    74             $this->version = '1.0.8';
     74            $this->version = '1.0.9';
    7575        }
    7676        $this->plugin_name = 'europarcel-com';
     
    8686     * managing checkout functionality and locker selection.
    8787     *
    88      * @since    1.0.8
     88     * @since    1.0.9
    8989     */
    9090    private function load_dependencies() {
     
    9999     * WordPress hooks for AJAX functionality and checkout integration.
    100100     *
    101      * @since    1.0.8
     101     * @since    1.0.9
    102102     */
    103103    private function define_woocommerce_hooks() {
     
    115115        // Classic checkout integration
    116116        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
    117119    }
    118120
     
    123125     * so this method is available for future use if needed.
    124126     *
    125      * @since    1.0.8
     127     * @since    1.0.9
    126128     */
    127129    public function run() {
     
    132134     * Get the plugin name
    133135     *
    134      * @since     1.0.8
     136     * @since     1.0.9
    135137     * @return    string    The plugin name
    136138     */
     
    142144     * Get the plugin version
    143145     *
    144      * @since     1.0.8
     146     * @since     1.0.9
    145147     * @return    string    The plugin version number
    146148     */
  • europarcel-com/tags/1.0.9/includes/class-europarcel-request-data.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2929 * based on WooCommerce shipping instance configuration.
    3030 *
    31  * @since      1.0.8
     31 * @since      1.0.9
    3232 * @package    Europarcel
    3333 * @subpackage Europarcel/includes
     
    3939     * The WooCommerce shipping instance ID
    4040     *
    41      * @since    1.0.8
     41     * @since    1.0.9
    4242     * @access   private
    4343     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    5151     * including carrier info, addresses, content details, and extra options.
    5252     *
    53      * @since    1.0.8
     53     * @since    1.0.9
    5454     * @access   private
    5555     * @var      array    $request_data    Complete shipping request data
     
    117117     * parcel specifications.
    118118     *
    119      * @since    1.0.8
     119     * @since    1.0.9
    120120     * @param    int     $instance_id     WooCommerce shipping method instance ID
    121121     * @param    bool    $allow_locker    Whether to allow locker delivery services
     
    176176     * Set the carrier ID for the shipping request
    177177     *
    178      * @since    1.0.8
     178     * @since    1.0.9
    179179     * @param    int    $carrier_id    The carrier ID from EuroParcel
    180180     */
     
    186186     * Set the service ID for the shipping request
    187187     *
    188      * @since    1.0.8
     188     * @since    1.0.9
    189189     * @param    int    $service_id    The service ID (1=standard, 2=locker)
    190190     */
     
    196196     * Set the delivery address for the shipping request
    197197     *
    198      * @since    1.0.8
     198     * @since    1.0.9
    199199     * @param    array    $delivery_address    Complete delivery address data
    200200     */
     
    208208     * Returns the prepared shipping request data ready for EuroParcel API calls.
    209209     *
    210      * @since    1.0.8
     210     * @since    1.0.9
    211211     * @return   array    Complete shipping request data
    212212     */
  • europarcel-com/tags/1.0.9/includes/class-europarcel-shipping.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2929 * and both standard and locker delivery options.
    3030 *
    31  * @since      1.0.8
     31 * @since      1.0.9
    3232 * @package    Europarcel
    3333 * @subpackage Europarcel/includes
     
    4242     * instance ID, method title, description, and supported features.
    4343     *
    44      * @since    1.0.8
     44     * @since    1.0.9
    4545     * @param    int    $instance_id    WooCommerce shipping zone instance ID
    4646     */
     
    6767     * and initializes the admin form fields.
    6868     *
    69      * @since    1.0.8
     69     * @since    1.0.9
    7070     */
    7171    public function init() {
     
    8787     * Dynamically loads customer information when API key is provided.
    8888     *
    89      * @since    1.0.8
     89     * @since    1.0.9
    9090     */
    9191    public function init_form_fields() {
     
    299299     * Validates nonce for security and processes each form field.
    300300     *
    301      * @since    1.0.8
     301     * @since    1.0.9
    302302     * @return   bool    True if options were saved successfully, false otherwise
    303303     */
     
    339339     * Creates shipping rates for both standard and locker delivery options.
    340340     *
    341      * @since    1.0.8
     341     * @since    1.0.9
    342342     * @param    array    $package    WooCommerce package data with contents and destination
    343343     */
  • europarcel-com/tags/1.0.9/languages/europarcel-com-ro_RO.po

    r3478259 r3490045  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.8\n"
     6"Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.9\n"
    77"Report-Msgid-Bugs-To: cs@europarcel.com\n"
    88"POT-Creation-Date: 2026-01-17 19:00+0200\n"
     
    349349msgstr "✓ Locker selectat -"
    350350
     351#: includes/class-europarcel-checkout.php
     352msgid "Please select a delivery locker before placing your order."
     353msgstr "Vă rugăm să selectați un locker de livrare înainte de a plasa comanda."
     354
    351355#: europarcel-com.php:142
    352356msgid "Documentation"
  • europarcel-com/tags/1.0.9/uninstall.php

    r3478259 r3490045  
    1010 *
    1111 * @link       https://eawb.ro
    12  * @since      1.0.8
     12 * @since      1.0.9
    1313 *
    1414 * @package    Europarcel
  • europarcel-com/trunk/README.txt

    r3478259 r3490045  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.8
     7Stable tag: 1.0.9
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    7777== Changelog ==
    7878
     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
    7983= 1.0.8 =
    8084* Fixed: Price fields now accept decimal values (e.g., 15.99) instead of integers only
     
    107111== Upgrade Notice ==
    108112
     113= 1.0.9 =
     114Locker selection is now mandatory at checkout when a locker shipping method is chosen.
     115
    109116= 1.0.8 =
    110117Bug fix: Price fields now accept decimal values.
  • europarcel-com/trunk/assets/css/europarcel-admin.css

    r3478259 r3490045  
    66 *
    77 * @package    Europarcel
    8  * @since      1.0.8
     8 * @since      1.0.9
    99 */
    1010
  • europarcel-com/trunk/assets/js/europarcel-admin.js

    r3478259 r3490045  
    66 *
    77 * @package    Europarcel
    8  * @since      1.0.8
     8 * @since      1.0.9
    99 */
    1010
  • europarcel-com/trunk/assets/js/europarcel-locker-selector.js

    r3478259 r3490045  
    77 *
    88 * @package    Europarcel
    9  * @since      1.0.8
     9 * @since      1.0.9
    1010 */
    1111
     
    366366                }
    367367
     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
    368375                displayLockerInfo(locker, true);
    369376                updateWooCommerceFields(locker);
  • europarcel-com/trunk/assets/js/europarcel-modal.js

    r3478259 r3490045  
    77 * @package    Europarcel
    88 * @subpackage Assets/JavaScript
    9  * @since      1.0.8
     9 * @since      1.0.9
    1010 */
    1111
     
    1616     * EuroParcel Modal object
    1717     *
    18      * @since 1.0.8
     18     * @since 1.0.9
    1919     */
    2020    window.EuroparcelModal = {
     
    2626         * Handles both desktop and mobile responsive display.
    2727         *
    28          * @since 1.0.8
     28         * @since 1.0.9
    2929         * @param {string} iframeUrl - The URL to load in the iframe
    3030         */
     
    9292         * Configures click handlers, escape key handler, and other modal interactions.
    9393         *
    94          * @since 1.0.8
     94         * @since 1.0.9
    9595         * @param {HTMLElement} modal - The modal element
    9696         * @param {boolean} isMobile - Whether the device is mobile
     
    141141         * Cleans up event listeners to prevent memory leaks.
    142142         *
    143          * @since 1.0.8
     143         * @since 1.0.9
    144144         */
    145145        close: function() {
  • europarcel-com/trunk/europarcel-com.php

    r3478259 r3490045  
    99 *
    1010 * @link              https://eawb.ro
    11  * @since             1.0.8
     11 * @since             1.0.9
    1212 * @package           Europarcel
    1313 *
     
    1515 * Plugin Name:       EuroParcel Integration for WooCommerce
    1616 * Description:       Connect your WooCommerce store with eAWB shipping platform
    17  * Version:           1.0.8
     17 * Version:           1.0.9
    1818 * Author:            EuroParcel
    1919 * Author URI:        https://eawb.ro/
     
    3131}
    3232
    33 define('EUROPARCELCOM_WC_VERSION', '1.0.8');
     33define('EUROPARCELCOM_WC_VERSION', '1.0.9');
    3434
    3535/**
     
    6565 * Declare compatibility with WooCommerce High-Performance Order Storage (HPOS)
    6666 *
    67  * @since    1.0.8
     67 * @since    1.0.9
    6868 */
    6969add_action('before_woocommerce_init', function() {
     
    7676 * Initialize the shipping method
    7777 *
    78  * @since    1.0.8
     78 * @since    1.0.9
    7979 */
    8080add_action('woocommerce_shipping_init', 'europarcelcom_wc_shipping_init');
     
    8383 * Load the shipping method class
    8484 *
    85  * @since    1.0.8
     85 * @since    1.0.9
    8686 */
    8787function europarcelcom_wc_shipping_init() {
     
    9595 * Register the shipping method with WooCommerce
    9696 *
    97  * @since    1.0.8
     97 * @since    1.0.9
    9898 * @param    array    $methods    Existing shipping methods
    9999 * @return   array                Updated shipping methods
     
    107107 * Enqueue admin styles and scripts
    108108 *
    109  * @since    1.0.8
     109 * @since    1.0.9
    110110 */
    111111add_action('admin_enqueue_scripts', function () {
    112112    $current_screen = get_current_screen();
    113113    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);
    116116    }
    117117});
     
    120120 * Initialize the main plugin class
    121121 *
    122  * @since    1.0.8
     122 * @since    1.0.9
    123123 */
    124124function europarcelcom_wc_plugin_run() {
     
    131131
    132132/**
     133 * Locker selection validation - Classic checkout
     134 *
     135 * @since    1.0.9
     136 */
     137add_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 */
     149add_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/**
    133161 * Add plugin row meta links (Documentation, Video Tutorial)
    134162 *
    135  * @since    1.0.8
     163 * @since    1.0.9
    136164 * @param    array     $links    Existing meta links
    137165 * @param    string    $file     Plugin file path
  • europarcel-com/trunk/includes/class-europarcel-activator.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://europarcel.com
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2020 * This class defines all code necessary to run during the plugin's activation.
    2121 *
    22  * @since      1.0.8
     22 * @since      1.0.9
    2323 * @package    Europarcel
    2424 * @subpackage Europarcel/includes
     
    3232     * Handles any setup tasks required when the plugin is activated.
    3333     *
    34      * @since    1.0.8
     34     * @since    1.0.9
    3535     */
    3636    public static function activate() {
    3737        // Store plugin version
    3838        if (!get_option('EUROPARCELCOM_WC_VERSION')) {
    39             add_option('EUROPARCELCOM_WC_VERSION', '1.0.8');
     39            add_option('EUROPARCELCOM_WC_VERSION', '1.0.9');
    4040        }
    4141       
  • europarcel-com/trunk/includes/class-europarcel-checkout.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2828 * for locker selection and shipping updates.
    2929 *
    30  * @since      1.0.8
     30 * @since      1.0.9
    3131 * @package    Europarcel
    3232 * @subpackage Europarcel/includes
     
    3838     * Whether the current checkout is blocks-based
    3939     *
    40      * @since    1.0.8
     40     * @since    1.0.9
    4141     * @access   private
    4242     * @var      bool    $is_blocks_checkout    True if blocks checkout detected
     
    5050     * via smart_init method to detect checkout type first.
    5151     *
    52      * @since    1.0.8
     52     * @since    1.0.9
    5353     */
    5454    public function __construct() {
     
    6262     * or Blocks-based and initializes the appropriate functionality.
    6363     *
    64      * @since    1.0.8
     64     * @since    1.0.9
    6565     */
    6666    public function smart_init() {
     
    8383     * Enqueues scripts and localizes data for WooCommerce Blocks checkout.
    8484     *
    85      * @since    1.0.8
     85     * @since    1.0.9
    8686     */
    8787    private function init_blocks_checkout() {
     
    9696     * Enqueues scripts and localizes data for WooCommerce Classic checkout.
    9797     *
    98      * @since    1.0.8
     98     * @since    1.0.9
    9999     */
    100100    private function init_classic_checkout() {
     
    110110     * and checkout type information for JavaScript usage.
    111111     *
    112      * @since    1.0.8
     112     * @since    1.0.9
    113113     */
    114114    private function localize_script_data() {
     
    191191     * Validates nonce and returns carrier data via JSON response.
    192192     *
    193      * @since    1.0.8
     193     * @since    1.0.9
    194194     */
    195195    public function wp_ajax_europarcelcomwc_get_locker_carriers() {
     
    221221     * Validates nonce and sanitizes all input data.
    222222     *
    223      * @since    1.0.8
     223     * @since    1.0.9
    224224     */
    225225    public function wp_ajax_europarcelcomwc_update_locker_shipping() {
     
    271271
    272272    /**
     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    /**
    273363     * Display locker selection button for classic checkout
    274364     *
     
    276366     * the locker selection button in classic checkout when applicable.
    277367     *
    278      * @since    1.0.8
     368     * @since    1.0.9
    279369     */
    280370    public function classic_checkout_button() {
  • europarcel-com/trunk/includes/class-europarcel-constants.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2727 * shipping services for both admin configuration and API requests.
    2828 *
    29  * @since      1.0.8
     29 * @since      1.0.9
    3030 * @package    Europarcel
    3131 * @subpackage Europarcel/includes
     
    4141     * All strings are internationalized for translation support.
    4242     *
    43      * @since    1.0.8
     43     * @since    1.0.9
    4444     * @return   array    Array of service keys and their translated display names
    4545     */
     
    6969     * - 2: Locker delivery (home to locker)
    7070     *
    71      * @since    1.0.8
     71     * @since    1.0.9
    7272     * @param    array|string    $services    Array of service keys to convert (or string for backward compatibility)
    7373     * @return   array    Array of carrier configuration arrays
  • europarcel-com/trunk/includes/class-europarcel-customer.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    3131 * and carrier service availability.
    3232 *
    33  * @since      1.0.8
     33 * @since      1.0.9
    3434 * @package    Europarcel
    3535 * @subpackage Europarcel/includes
     
    4141     * The WooCommerce shipping instance ID
    4242     *
    43      * @since    1.0.8
     43     * @since    1.0.9
    4444     * @access   private
    4545     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    5050     * The shipping method settings
    5151     *
    52      * @since    1.0.8
     52     * @since    1.0.9
    5353     * @access   public
    5454     * @var      array    $settings    WooCommerce shipping method settings
     
    6262     * configuration and loads the associated settings.
    6363     *
    64      * @since    1.0.8
     64     * @since    1.0.9
    6565     * @param    int    $instance_id    WooCommerce shipping method instance ID
    6666     */
     
    7676     * the EuroParcel API including name, contact details, and account status.
    7777     *
    78      * @since    1.0.8
     78     * @since    1.0.9
    7979     * @return   array|null    Customer account data or null on failure
    8080     */
     
    100100     * EuroParcel account for use in shipping calculations.
    101101     *
    102      * @since    1.0.8
     102     * @since    1.0.9
    103103     * @return   array    Array of billing addresses with ID as key and formatted address as value
    104104     */
     
    138138     * EuroParcel account for use as pickup locations.
    139139     *
    140      * @since    1.0.8
     140     * @since    1.0.9
    141141     * @return   array    Array of pickup addresses with ID as key and formatted address as value
    142142     */
     
    177177     * and destination address.
    178178     *
    179      * @since    1.0.8
     179     * @since    1.0.9
    180180     * @param    array    $package        WooCommerce package data with destination details
    181181     * @param    bool     $allow_locker   Whether to include locker delivery options
     
    262262     * Used with usort() to arrange services from lowest to highest cost.
    263263     *
    264      * @since    1.0.8
     264     * @since    1.0.9
    265265     * @param    array    $first_service     First service for comparison
    266266     * @param    array    $second_service    Second service for comparison
     
    280280     * based on the configured available services.
    281281     *
    282      * @since    1.0.8
     282     * @since    1.0.9
    283283     * @return   array    Array of carrier IDs that support locker delivery
    284284     */
     
    316316     * based on the configured available services.
    317317     *
    318      * @since    1.0.8
     318     * @since    1.0.9
    319319     * @return   array|false    Array of carrier IDs that support standard delivery or false if none available
    320320     */
  • europarcel-com/trunk/includes/class-europarcel-deactivator.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://europarcel.com
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2020 * This class defines all code necessary to run during the plugin's deactivation.
    2121 *
    22  * @since      1.0.8
     22 * @since      1.0.9
    2323 * @package    Europarcel
    2424 * @subpackage Europarcel/includes
     
    3232     * Handles any cleanup tasks required when the plugin is deactivated.
    3333     *
    34      * @since    1.0.8
     34     * @since    1.0.9
    3535     */
    3636    public static function deactivate() {
  • europarcel-com/trunk/includes/class-europarcel-http-request.php

    r3478259 r3490045  
    88 *
    99 * @link       https://eawb.ro
    10  * @since      1.0.8
     10 * @since      1.0.9
    1111 *
    1212 * @package    Europarcel
     
    2626 * for both GET and POST requests with proper error handling.
    2727 *
    28  * @since      1.0.8
     28 * @since      1.0.9
    2929 * @package    Europarcel
    3030 * @subpackage Europarcel/includes
     
    3636     * The shipping method instance ID
    3737     *
    38      * @since    1.0.8
     38     * @since    1.0.9
    3939     * @access   private
    4040     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    4848     * shipping method settings and API key.
    4949     *
    50      * @since    1.0.8
     50     * @since    1.0.9
    5151     * @param    int    $instance_id    WooCommerce shipping method instance ID
    5252     */
     
    6060     * query parameters and handles the response.
    6161     *
    62      * @since    1.0.8
     62     * @since    1.0.9
    6363     * @param    string    $function    API endpoint function name
    6464     * @param    array     $data        Optional query parameters
     
    8989     * the provided data and handles the response.
    9090     *
    91      * @since    1.0.8
     91     * @since    1.0.9
    9292     * @param    string    $function    API endpoint function name
    9393     * @param    array     $data        POST data to send
     
    115115     * Throws exceptions for various error conditions.
    116116     *
    117      * @since    1.0.8
     117     * @since    1.0.9
    118118     * @param    array|WP_Error    $response    WordPress HTTP API response
    119119     * @return   array             Decoded JSON response
     
    155155     * the headers required for EuroParcel API authentication.
    156156     *
    157      * @since    1.0.8
     157     * @since    1.0.9
    158158     * @return   array    HTTP headers array with API key
    159159     */
  • europarcel-com/trunk/includes/class-europarcel-main.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2626 * both classic and blocks checkout types.
    2727 *
    28  * @since      1.0.8
     28 * @since      1.0.9
    2929 * @package    Europarcel
    3030 * @subpackage Europarcel/includes
     
    3636     * The plugin name
    3737     *
    38      * @since    1.0.8
     38     * @since    1.0.9
    3939     * @access   protected
    4040     * @var      string    $plugin_name    The plugin identifier name
     
    4545     * The plugin version
    4646     *
    47      * @since    1.0.8
     47     * @since    1.0.9
    4848     * @access   protected
    4949     * @var      string    $version    The current plugin version
     
    5454     * The checkout handler instance
    5555     *
    56      * @since    1.0.8
     56     * @since    1.0.9
    5757     * @access   protected
    5858     * @var      EuroparcelCheckout    $checkout_handler    Handles checkout functionality
     
    6666     * and defines WooCommerce hooks for checkout functionality.
    6767     *
    68      * @since    1.0.8
     68     * @since    1.0.9
    6969     */
    7070    public function __construct() {
     
    7272            $this->version = EUROPARCELCOM_WC_VERSION;
    7373        } else {
    74             $this->version = '1.0.8';
     74            $this->version = '1.0.9';
    7575        }
    7676        $this->plugin_name = 'europarcel-com';
     
    8686     * managing checkout functionality and locker selection.
    8787     *
    88      * @since    1.0.8
     88     * @since    1.0.9
    8989     */
    9090    private function load_dependencies() {
     
    9999     * WordPress hooks for AJAX functionality and checkout integration.
    100100     *
    101      * @since    1.0.8
     101     * @since    1.0.9
    102102     */
    103103    private function define_woocommerce_hooks() {
     
    115115        // Classic checkout integration
    116116        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
    117119    }
    118120
     
    123125     * so this method is available for future use if needed.
    124126     *
    125      * @since    1.0.8
     127     * @since    1.0.9
    126128     */
    127129    public function run() {
     
    132134     * Get the plugin name
    133135     *
    134      * @since     1.0.8
     136     * @since     1.0.9
    135137     * @return    string    The plugin name
    136138     */
     
    142144     * Get the plugin version
    143145     *
    144      * @since     1.0.8
     146     * @since     1.0.9
    145147     * @return    string    The plugin version number
    146148     */
  • europarcel-com/trunk/includes/class-europarcel-request-data.php

    r3478259 r3490045  
    99 *
    1010 * @link       https://eawb.ro
    11  * @since      1.0.8
     11 * @since      1.0.9
    1212 *
    1313 * @package    Europarcel
     
    2929 * based on WooCommerce shipping instance configuration.
    3030 *
    31  * @since      1.0.8
     31 * @since      1.0.9
    3232 * @package    Europarcel
    3333 * @subpackage Europarcel/includes
     
    3939     * The WooCommerce shipping instance ID
    4040     *
    41      * @since    1.0.8
     41     * @since    1.0.9
    4242     * @access   private
    4343     * @var      int    $instance_id    WooCommerce shipping method instance ID
     
    5151     * including carrier info, addresses, content details, and extra options.
    5252     *
    53      * @since    1.0.8
     53     * @since    1.0.9
    5454     * @access   private
    5555     * @var      array    $request_data    Complete shipping request data
     
    117117     * parcel specifications.
    118118     *
    119      * @since    1.0.8
     119     * @since    1.0.9
    120120     * @param    int     $instance_id     WooCommerce shipping method instance ID
    121121     * @param    bool    $allow_locker    Whether to allow locker delivery services
     
    176176     * Set the carrier ID for the shipping request
    177177     *
    178      * @since    1.0.8
     178     * @since    1.0.9
    179179     * @param    int    $carrier_id    The carrier ID from EuroParcel
    180180     */
     
    186186     * Set the service ID for the shipping request
    187187     *
    188      * @since    1.0.8
     188     * @since    1.0.9
    189189     * @param    int    $service_id    The service ID (1=standard, 2=locker)
    190190     */
     
    196196     * Set the delivery address for the shipping request
    197197     *
    198      * @since    1.0.8
     198     * @since    1.0.9
    199199     * @param    array    $delivery_address    Complete delivery address data
    200200     */
     
    208208     * Returns the prepared shipping request data ready for EuroParcel API calls.
    209209     *
    210      * @since    1.0.8
     210     * @since    1.0.9
    211211     * @return   array    Complete shipping request data
    212212     */
  • europarcel-com/trunk/includes/class-europarcel-shipping.php

    r3478259 r3490045  
    1313 *
    1414 * @link       https://eawb.ro
    15  * @since      1.0.8
     15 * @since      1.0.9
    1616 *
    1717 * @package    Europarcel
     
    2929 * and both standard and locker delivery options.
    3030 *
    31  * @since      1.0.8
     31 * @since      1.0.9
    3232 * @package    Europarcel
    3333 * @subpackage Europarcel/includes
     
    4242     * instance ID, method title, description, and supported features.
    4343     *
    44      * @since    1.0.8
     44     * @since    1.0.9
    4545     * @param    int    $instance_id    WooCommerce shipping zone instance ID
    4646     */
     
    6767     * and initializes the admin form fields.
    6868     *
    69      * @since    1.0.8
     69     * @since    1.0.9
    7070     */
    7171    public function init() {
     
    8787     * Dynamically loads customer information when API key is provided.
    8888     *
    89      * @since    1.0.8
     89     * @since    1.0.9
    9090     */
    9191    public function init_form_fields() {
     
    299299     * Validates nonce for security and processes each form field.
    300300     *
    301      * @since    1.0.8
     301     * @since    1.0.9
    302302     * @return   bool    True if options were saved successfully, false otherwise
    303303     */
     
    339339     * Creates shipping rates for both standard and locker delivery options.
    340340     *
    341      * @since    1.0.8
     341     * @since    1.0.9
    342342     * @param    array    $package    WooCommerce package data with contents and destination
    343343     */
  • europarcel-com/trunk/languages/europarcel-com-ro_RO.po

    r3478259 r3490045  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.8\n"
     6"Project-Id-Version: EuroParcel Integration for WooCommerce 1.0.9\n"
    77"Report-Msgid-Bugs-To: cs@europarcel.com\n"
    88"POT-Creation-Date: 2026-01-17 19:00+0200\n"
     
    349349msgstr "✓ Locker selectat -"
    350350
     351#: includes/class-europarcel-checkout.php
     352msgid "Please select a delivery locker before placing your order."
     353msgstr "Vă rugăm să selectați un locker de livrare înainte de a plasa comanda."
     354
    351355#: europarcel-com.php:142
    352356msgid "Documentation"
  • europarcel-com/trunk/uninstall.php

    r3478259 r3490045  
    1010 *
    1111 * @link       https://eawb.ro
    12  * @since      1.0.8
     12 * @since      1.0.9
    1313 *
    1414 * @package    Europarcel
Note: See TracChangeset for help on using the changeset viewer.