Fixed shipping flat price change to free shipping when shipping cost represented using decimal separators and thousands separators (#46857)
* Fixed shipping flat price change to free shipping when shipping cost represented using decimal separators and thousands separators * added the changelog file --------- Co-authored-by: Saiful Islam <anandacsebd@gmail.com>
This commit is contained in:
parent
86bc377977
commit
4d44a6e891
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fixed shipping flat price change to free shipping when shipping cost represented using decimal separators and thousands separators.
|
|
@ -108,6 +108,9 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
|
|||
// Remove whitespace from string.
|
||||
$sum = preg_replace( '/\s+/', '', $sum );
|
||||
|
||||
// Removed thousand separator.
|
||||
$sum = str_replace( wc_get_price_thousand_separator(), '', $sum );
|
||||
|
||||
// Remove locale from string.
|
||||
$sum = str_replace( $decimals, '.', $sum );
|
||||
|
||||
|
|
Loading…
Reference in New Issue