Changeset 3346250
- Timestamp:
- 08/18/2025 08:54:00 AM (7 months ago)
- Location:
- pay-via-barion-for-woocommerce/trunk
- Files:
-
- 3 edited
-
includes/class-wc-gateway-barion-request.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pay-via-barion-for-woocommerce/trunk/includes/class-wc-gateway-barion-request.php
r3338924 r3346250 98 98 $shipping_cost = (float) wc_get_order_item_meta($item_id, 'cost'); 99 99 $shipping_taxes = wc_get_order_item_meta($item_id, 'taxes'); 100 101 // Handle shipping taxes safely 102 $tax_amount = 0; 100 103 if (!empty($shipping_taxes) && is_array($shipping_taxes)) { 101 $shipping_cost = floatval($shipping_cost) + floatval(array_sum($shipping_taxes)); 104 // Check if it's a multidimensional array with 'total' key 105 if (isset($shipping_taxes['total']) && is_array($shipping_taxes['total'])) { 106 // Sum the 'total' taxes 107 foreach ($shipping_taxes['total'] as $tax) { 108 $tax_amount += (float) $tax; 109 } 110 } elseif (!isset($shipping_taxes['total']) && !isset($shipping_taxes['subtotal'])) { 111 // It's a simple array, sum directly 112 foreach ($shipping_taxes as $tax) { 113 if (is_numeric($tax)) { 114 $tax_amount += (float) $tax; 115 } 116 } 117 } 102 118 } 119 120 $shipping_cost = floatval($shipping_cost) + floatval($tax_amount); 103 121 $itemModel->UnitPrice = $shipping_cost; 104 122 $itemModel->ItemTotal = $shipping_cost; -
pay-via-barion-for-woocommerce/trunk/index.php
r3338924 r3346250 4 4 Plugin URI: http://github.com/szelpe/woocommerce-barion 5 5 Description: Adds the ability to WooCommerce to pay via Barion 6 Version: 3.8. 66 Version: 3.8.7 7 7 Author: Aron Ocsvari <ugyfelszolgalat@bitron.hu> 8 8 Author URI: https://bitron.hu -
pay-via-barion-for-woocommerce/trunk/readme.txt
r3338924 r3346250 89 89 90 90 == Changelog == 91 = 3.8.7 = 92 * Fix for shipping tax calculation error 91 93 = 3.8.6 = 92 94 * Fix: Deprecated errors
Note: See TracChangeset
for help on using the changeset viewer.