Plugin Directory

Changeset 3467627


Ignore:
Timestamp:
02/23/2026 11:32:09 AM (5 weeks ago)
Author:
wootro
Message:

v2.2.3 - Show fixed-price shipping services immediately at checkout; enforce minimum 1kg parcel weight

Location:
woot-ro/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woot-ro/trunk/README.txt

    r3465610 r3467627  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 2.2.2
     6Stable tag: 2.2.3
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    7878
    7979== Changelog ==
     80
     81= 2.2.3 =
     82* Improvement: Shipping services with fixed prices now display immediately without requiring full address
     83* Improvement: Only quotation-based services wait for complete address before appearing
     84* Fix: Parcel weight now enforces minimum 1kg and rounds up to nearest integer for all courier API calls
    8085
    8186= 2.2.2 =
     
    183188== Upgrade Notice ==
    184189
     190= 2.2.3 =
     191* Shipping options with fixed prices now appear immediately at checkout. Parcel weight minimum enforced at 1kg.
     192
    185193= 2.2.2 =
    186194* Fix: Resolved PHP warnings ("Array to string conversion") that could appear during shipping price quotation.
  • woot-ro/trunk/includes/admin/class-woot-admin-order.php

    r3462605 r3467627  
    717717        );
    718718
    719         // Weight
     719        // Weight (minimum 1kg)
    720720        if ($total_weight > 0) {
    721             $parcel['weight'] = $total_weight;
     721            $parcel['weight'] = max(1, ceil($total_weight));
    722722        } elseif ($default_parcel && !empty($default_parcel['weight'])) {
    723             $parcel['weight'] = floatval($default_parcel['weight']);
     723            $parcel['weight'] = max(1, ceil(floatval($default_parcel['weight'])));
    724724        } else {
    725725            $parcel['weight'] = 1;
  • woot-ro/trunk/includes/shipping/class-woot-shipping-services.php

    r3465610 r3467627  
    751751    public function calculate_shipping($package = array()): void
    752752    {
    753         // Don't calculate shipping until required address fields are filled
    754         if (!$this->has_required_address_fields($package)) {
    755             return;
    756         }
     753        $has_full_address = $this->has_required_address_fields($package);
    757754
    758755        $services = $this->get_services();
     
    778775        // Get quotation prices if needed
    779776        $quotation_prices = array();
    780         if (!empty($quotation_service_ids) && !$is_free) {
     777        if (!empty($quotation_service_ids) && !$is_free && $has_full_address) {
    781778            $quotation_prices = $this->get_quotation_prices($package, $quotation_service_ids);
    782779        }
     
    822819                $cost = 0;
    823820            } elseif ($price_type === 'quotation') {
     821                // Skip quotation services if we don't have full address yet
     822                if (!$has_full_address) {
     823                    continue;
     824                }
    824825                // Use quotation price if available, otherwise fallback
    825826                $service_id = $service['id'];
     
    11021103        );
    11031104
    1104         // Weight: sum of products or default parcel or 1kg
     1105        // Weight: sum of products or default parcel or 1kg (minimum 1kg)
    11051106        if ($total_weight > 0) {
    1106             $parcel['weight'] = $total_weight;
     1107            $parcel['weight'] = max(1, ceil($total_weight));
    11071108        } elseif ($default_parcel && !empty($default_parcel['weight'])) {
    1108             $parcel['weight'] = floatval($default_parcel['weight']);
     1109            $parcel['weight'] = max(1, ceil(floatval($default_parcel['weight'])));
    11091110        } else {
    11101111            $parcel['weight'] = 1; // Default 1kg
  • woot-ro/trunk/woot.php

    r3465610 r3467627  
    1717 * Plugin URI:        https://woot.ro
    1818 * Description:       Integrates all popular couriers in Romania, providing a one-stop solution for all your delivery needs
    19  * Version:           2.2.2
     19 * Version:           2.2.3
    2020 * Author:            Woot.ro
    2121 * Author URI:        https://woot.ro
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('WOOT_VERSION', '2.2.2');
     38define('WOOT_VERSION', '2.2.3');
    3939
    4040/**
Note: See TracChangeset for help on using the changeset viewer.