WooCommerce Multilingual allows you to decide what happens with items currently in the cart, when users switch to another language or currency.
Sometimes, the products in your site might come with multiple complex options like table-rate shipping, or can be of a specific product type like subscriptions or bookings. This allows for a very complex combination of products and their options, all of which are crucial for the final checkout process. Sometimes, synchronizing all these options when customers switch language or currency does not work correctly.
This is why WooCommerce Multilingual allows you to decide what happens when users switch the language or the currency. Basically, if you notice that your product options and data is not synchronizing correctly when switching languages or currency, you should set the option to clear the cart contents when this happens.
Important thing to note here is that these options work on all front-end pages, including the Cart and Checkout.
This feature was introduced with the 4.0 version of WooCommerce Multilingual. If you are still running an older version, please update to the latest one to enjoy all the new features and improvements.
Cart options
To set the cart options when a language or currency changes, go to the WooCommerce -> WooCommerce Multilingual page and click the Settings tab. There, look for the Cart section.
There are two options you can set for both cases, switching of a language or currency:
- Synchronize cart content
- Prompt for a confirmation and reset the cart.
Synchronize cart content
This is the default option and is used for new sites, as well as the ones updating to the latest version of the plugin.
WooCommerce Multilingual will try to synchronize the customer’s contents. If synchronization works properly, you will see all the cart settings preserved when switching either the language or currency.
Prompt for a confirmation and reset the cart
This is the option to use when you notice issues with the cart synchronization.
When customers have items in the cart and switch a language or currency, a dialog box is displayed. It provides an option to proceed and reset the cart, or to go back and keep the items in the cart, as shown in the following two screenshots.
Dialog when switching languages | Dialog when switching currencies |
---|---|
Showing the list of items cleared from the cart
Clearing cart contents is an inconvenience for the customers. Their cart is emptied and they need to find all the products again.
To help with this, we created a simple widget called Products before cart reset. It displays a list of products that were removed after switching language or currency. This way, customers can easily find all the products they had in the cart and add them again.
The following image displays this widget on the Appearance -> Widgets page.
The following image displays the widget output after switching the currency and the cart is reset.