Closed digodt24 closed 4 years ago
I have product variations, price_decimal_separator , [comma] and a fee: 0,5 (set in the variation tab) [fee set in variation tab: 1,5 works fine, btw]
if ( '' !== $fee_name && '' !== $fee_amount && $fee_amount > 0 ) { return true; } return false;
returns false and no fee is added
My workaround:
$fee_amount = str_replace( wc_get_price_decimal_separator(), '.', $fee_amount ); if ( '' !== $fee_name && '' !== $fee_amount && $fee_amount > 0 ) { return true; } return false; }
This works fine, but you should have a look at this issue
http://sandbox.onlinephpfunctions.com/code/b7a3955e5652e5e38182613cbe4a8f9f79758638
Ah, nice find. Can't compare to being greater than 0 until I turn it into a valid number. Thanks, will get this fixed up.
Fixed in https://github.com/WPprodigy/woocommerce-product-fees/commit/5b1c364a27126397587b662354cd277888387ab1
I have product variations, price_decimal_separator , [comma] and a fee: 0,5 (set in the variation tab) [fee set in variation tab: 1,5 works fine, btw]
returns false and no fee is added
My workaround:
This works fine, but you should have a look at this issue