If the decimal separator in WooCommerce core currency options is not . and shipping data is obtained from WooCommerce core, the shipping data may not be synced to Google Merchant Center.
This issue occurs in all relevant fields:
Single shipping cost
Shipping class costs
Free shipping threshold
Steps to reproduce:
Go to WooCommerce > Settings > General and set the decimal separator in the currency options to ,.
Go to WooCommerce > Settings > Shipping > Shipping zones and set up a zone with:
Free shipping and minimum order amount, e.g. 999,99
Flat rate with single cost or class costs.
Go to edit free listings.
Select the Recommended: Automatically sync my store’s shipping settings to Google option for the shipping rates setting.
Add the above configured zone to the Audience setting.
Save changes.
Wait a moment for the settings to sync to Google Merchant Center.
Go to Google Merchant Center and navigate to Shipping and returns page.
No shipping data has been synchronized to Shipping policies.
Expected behavior:
The shipping costs should be parsed according to the currency options set in the WooCommerce core and synced correctly to Google Merchant Center.
Actual behavior:
The shipping costs may not be parsed and omitted to sync to Google Merchant Center when the decimal separator in WooCommerce core currency options is not using ..
Describe the bug:
If the decimal separator in WooCommerce core currency options is not
.
and shipping data is obtained from WooCommerce core, the shipping data may not be synced to Google Merchant Center.This issue occurs in all relevant fields:
Steps to reproduce:
,
.999,99
Expected behavior:
The shipping costs should be parsed according to the currency options set in the WooCommerce core and synced correctly to Google Merchant Center.
Actual behavior:
The shipping costs may not be parsed and omitted to sync to Google Merchant Center when the decimal separator in WooCommerce core currency options is not using
.
.Additional details:
How WooCommerce core handles amount formatting: https://github.com/woocommerce/woocommerce/blob/9.0.2/plugins/woocommerce/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php#L108-L115