Closed kleinermann closed 4 years ago
Found in another forum:
This solution seem working.
file class-woocommerce-product-fees.php
line 52 must be: if ( ” !== $fee_name && ” !== $fee_amount && $fee_amount >= 0 ) {
difference is “the greater than or equal to” comparison operator. Original one was only the major.
Related https://github.com/WPprodigy/woocommerce-product-fees/issues/39
The "proper" fix is actually switching out the decimal separator: $fee_amount = str_replace( wc_get_price_decimal_separator(), '.', get_post_meta( $id, 'product-fee-amount', true ) );
.
The only reason it currently works is because of PHP's type switching 🙃
'1,5' > 0 //true
'0,5' > 0 // false
'1.5' > 0 // true
'0.5' > 0 // true
Numbers like 0,13 don't show up in the cart. A fix for this has been posted here: https://wordpress.org/support/topic/not-work-with-0000xxx-product-fees/ Any chance to add this fix to the project?