Plugin Directory

Changeset 3417655


Ignore:
Timestamp:
12/11/2025 06:18:40 PM (4 months ago)
Author:
kirillbdev
Message:

Release 1.18.6

Location:
wc-ukr-shipping
Files:
416 added
5 edited

Legend:

Unmodified
Added
Removed
  • wc-ukr-shipping/trunk/readme.txt

    r3417338 r3417655  
    66Requires PHP: 7.4
    77Tested up to: 6.9
    8 Stable tag: 1.18.5
     8Stable tag: 1.18.6
    99
    1010Connect Nova Poshta, Ukrposhta or international delivery services with your store. Create labels, track orders and calculate rates in one place.
     
    107107== Changelog ==
    108108
     109= Version 1.18.6 / (11.12.2025) =
     110* Removed strict checking of delivery type at shipping cost calculation.
     111* Added more option defaults.
     112
    109113= Version 1.18.5 / (11.12.2025) =
    110114* Hotfix: Shipping recalculation when changing delivery type.
  • wc-ukr-shipping/trunk/src/DB/OptionsRepository.php

    r3409828 r3417655  
    3636
    3737            // Nova Poshta
     38            'wc_ukr_shipping_address_shipping' => 1,
     39            'wcus_show_poshtomats' => 1,
    3840            'wcus_np_use_online_directory' => 0,
    3941            'wcus_ttn_global_params_default' => 0,
  • wc-ukr-shipping/trunk/src/Factories/Rates/NovaPoshta/NovaPoshtaCheckoutOrderFactory.php

    r3417321 r3417655  
    4848    {
    4949        switch ($data['shipping_type']) {
    50             case 'warehouse':
    51             case 'warehouse_poshtomat':
    52                 return 'w2w';
    5350            case 'doors':
    5451                return 'w2d';
     
    5653                return 'w2l';
    5754            default:
    58                 throw new \InvalidArgumentException("Unsupported delivery type");
     55                return 'w2w';
    5956        }
    6057    }
  • wc-ukr-shipping/trunk/src/Foundation/NovaPoshtaShipping.php

    r3417321 r3417655  
    7474                'desc_tip' => true,
    7575                'description' => __('You can choose which types of delivery will be processed by this shipping method or create several shipping methods with concrete delivery types separately.', 'wc-ukr-shipping-i18n'),
     76                'sanitize_callback' => [$this, 'sanitizeDeliveryMethods'],
    7677            ],
    7778            'combine_poshtomats' => [
     
    203204    }
    204205
     206    /**
     207     * @param mixed $value
     208     * @return mixed
     209     */
     210    public function sanitizeDeliveryMethods($value)
     211    {
     212        if (!is_array($value) || count($value) < 1) {
     213            throw new \InvalidArgumentException('You should select at least one delivery method');
     214        }
     215
     216        return $value;
     217    }
     218
    205219    private function shouldCalculated(): bool
    206220    {
  • wc-ukr-shipping/trunk/wc-ukr-shipping.php

    r3417338 r3417655  
    44 * Plugin URI: https://smartyparcel.com
    55 * Description: Integration of Nova Poshta and Ukrposhta delivery services for WooCommerce
    6  * Version: 1.18.5
     6 * Version: 1.18.6
    77 * Author: kirillbdev
    88 * License: GPLv3
Note: See TracChangeset for help on using the changeset viewer.