Changeset 3467627
- Timestamp:
- 02/23/2026 11:32:09 AM (5 weeks ago)
- Location:
- woot-ro/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (3 diffs)
-
includes/admin/class-woot-admin-order.php (modified) (1 diff)
-
includes/shipping/class-woot-shipping-services.php (modified) (4 diffs)
-
woot.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woot-ro/trunk/README.txt
r3465610 r3467627 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2. 26 Stable tag: 2.2.3 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 78 78 79 79 == 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 80 85 81 86 = 2.2.2 = … … 183 188 == Upgrade Notice == 184 189 190 = 2.2.3 = 191 * Shipping options with fixed prices now appear immediately at checkout. Parcel weight minimum enforced at 1kg. 192 185 193 = 2.2.2 = 186 194 * 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 717 717 ); 718 718 719 // Weight 719 // Weight (minimum 1kg) 720 720 if ($total_weight > 0) { 721 $parcel['weight'] = $total_weight;721 $parcel['weight'] = max(1, ceil($total_weight)); 722 722 } elseif ($default_parcel && !empty($default_parcel['weight'])) { 723 $parcel['weight'] = floatval($default_parcel['weight']);723 $parcel['weight'] = max(1, ceil(floatval($default_parcel['weight']))); 724 724 } else { 725 725 $parcel['weight'] = 1; -
woot-ro/trunk/includes/shipping/class-woot-shipping-services.php
r3465610 r3467627 751 751 public function calculate_shipping($package = array()): void 752 752 { 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); 757 754 758 755 $services = $this->get_services(); … … 778 775 // Get quotation prices if needed 779 776 $quotation_prices = array(); 780 if (!empty($quotation_service_ids) && !$is_free ) {777 if (!empty($quotation_service_ids) && !$is_free && $has_full_address) { 781 778 $quotation_prices = $this->get_quotation_prices($package, $quotation_service_ids); 782 779 } … … 822 819 $cost = 0; 823 820 } elseif ($price_type === 'quotation') { 821 // Skip quotation services if we don't have full address yet 822 if (!$has_full_address) { 823 continue; 824 } 824 825 // Use quotation price if available, otherwise fallback 825 826 $service_id = $service['id']; … … 1102 1103 ); 1103 1104 1104 // Weight: sum of products or default parcel or 1kg 1105 // Weight: sum of products or default parcel or 1kg (minimum 1kg) 1105 1106 if ($total_weight > 0) { 1106 $parcel['weight'] = $total_weight;1107 $parcel['weight'] = max(1, ceil($total_weight)); 1107 1108 } elseif ($default_parcel && !empty($default_parcel['weight'])) { 1108 $parcel['weight'] = floatval($default_parcel['weight']);1109 $parcel['weight'] = max(1, ceil(floatval($default_parcel['weight']))); 1109 1110 } else { 1110 1111 $parcel['weight'] = 1; // Default 1kg -
woot-ro/trunk/woot.php
r3465610 r3467627 17 17 * Plugin URI: https://woot.ro 18 18 * Description: Integrates all popular couriers in Romania, providing a one-stop solution for all your delivery needs 19 * Version: 2.2. 219 * Version: 2.2.3 20 20 * Author: Woot.ro 21 21 * Author URI: https://woot.ro … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('WOOT_VERSION', '2.2. 2');38 define('WOOT_VERSION', '2.2.3'); 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.