This thread is resolved. Here is a description of the problem and solution.
Problem:
You are using the WCML plugin to display different prices based on the site language and currency. Each language has a designated currency without a currency switcher. You've encountered an issue where some currencies do not have a price set, and WCML defaults to using the price of the default currency. You are looking for a way to not display prices for currencies that don't have a price entered and are wondering if the
wcml_product_price_by_currency
filter can be modified to achieve this.
Solution:
We recommend managing custom prices directly on the original product in the default language. Prices for each currency should be manually set on the original product. If a custom price is set, WCML will use this price instead of the default currency price. If no custom price is set, consider setting the translated product visibility to "Private" or "Draft" to hide it, or ensure all original products have custom prices for each currency. Note that using the
wcml_product_price_by_currency
filter requires a custom price to be set for the active currency on the original product. Setting prices to "0" might not prevent purchases unless stock is also set to "0", which could complicate stock synchronization later.
Please be aware that custom code solutions and issues beyond WPML’s built-in functionality are not covered by our support. If you require a custom solution, consider hiring an independent contractor.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 1 reply, has 0 voices.
Last updated by 1 month, 1 week ago.
Assisted by: Andreas W..