[Resolved] Set a specific product with a different currency
This thread is resolved. Here is a description of the problem and solution.
Problem: The client wants to set a specific product with a different currency and have other currencies converted from this set currency on a multi-vendor platform using Dokan. The client also inquires if it's possible to set a different main currency for each vendor. Solution: We informed the client that currently, WooCommerce Multilingual or WooCommerce does not support setting a specific currency for a vendor, user, or country. However, a future version of WooCommerce Multilingual (5.5) will include a feature to set prices based on the country, but it is still in the early development stage. For now, a custom plugin might be necessary. We suggested checking out the WooCommerce Product Price Based on Countries plugin, although we have not tested this ourselves. For custom development, we recommended contacting certified developers through this link. Additionally, we provided a code snippet using the
wcml_raw_price_amount
hook to convert from the WooCommerce default currency price to another currency, and pointed to the function that auto-updates product prices in other currencies:
The update_exchange_rates function is defined in the *wp-content/plugins/woocommerce-multilingual/classes/multi-currency/class-wcml-exchange-rates.php* file (line 151).
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.
Background of the issue:
My website is set with USD currency. I want to set a specific product with a different currency. If I understand correctly, the other currencies are converted from US dollars (in the database save only USD price and the other currencies are converted from USD). I want this specific product to be set to a different currency and the other currencies to be converted from the currency that I set for it.
Symptoms:
No specific issue or error message mentioned.
Questions:
Is there a way I can set a specific product with a different currency?
Can the other currencies be converted from the currency that I set for this specific product?
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
Normally we can only set the price in the default currency and there are limitations to setting the price for a single Product in a different currency. This looks like a custom requirement.
We hope you want to create a specific product with a different currency in the default language.
So I will consult with our developers for an expert opinion and get back to you as early as possible. Please wait.
I will explain my need. Maybe it will help to find a good solution.
I develop a website with Dokan - a multi-vendor plugin, And I want each vendor to be able to create products with their own currency and the other currencies will be converted from the main currency.
If there is a way to create a specific product with a different currency, I can define that a specific vendor will have all his products with the different currency.
This is the way I thought would be best to set each vendor with a different currency. If there is another way to define a different main currency for each vendor, I would love to hear it.
Thank you for the details. How many vendors do you have normally?
Please choose display products only when they have custom prices option in WooCommerce>>WooCommerce Multilingual>>Multicurrency and check you are getting the expected results. Refer to the following links for more details
Prices are customized for the customer. that in each country a different currency will be presented.
I want customized for the vendor.
If I have 2 vendors, one from the USA and whose currency is dollars, and the other from Europe whose currency is euros, I want each of them to be able to import the products with their own currency.
I want them both to have the option to sync their website with mine. And if one vendor has a website and the prices are in dollars and the other vendor's website has the prices in euros, I want each of them to have a different main currency so that each of them can synchronize with their own currency.
That's why I asked if there is a way to define a single product with a different main currency. Because if there is a way, I can define that all the products of a certain seller will have a different currency as their main currency.
Currently I have 100 venders. I am working now to add more venders to my website.
We are sorry to inform you that currently, WooCommerce Multilingual or WooCommerce doesn't support setting a specific currency for a vendor, user, or country. However, the upcoming WooCommerce Multilingual version (5.5) will include a feature to set prices based on the country, but it's still in the early development stage.
For now, you might need a custom plugin to meet your needs. You could also try some other plugins like the following (though we haven't tested them ourselves).
Thank you for your kind understanding. For custom development, feel free to reach out to our certified developers. Please check the following links for more details.
I'm working with a developer on Dokan and we are trying to use the automatic currency function to get the products pricing updated by each individual store's currency (we added this field in Dokan store settings) instead of it using $woo main currency,,, do you have any advice of idea to help us find what we need?
Thank you for the feedback. We can use wcml_raw_price_amount hook to convert from the WooCoommerce default currency price (of a Product) to another currency. Refer to the following URL for more details.
And for this Could you please point to the function that is auto updating the product prices in other currencies?, you can try like the following. But haven't tested it before. We are sorry, but as per our support policy, we have limitations on assisting with custom coding. Thank you for your understanding.
The update_exchange_rates function is defined in *wp-content/plugins/woocommerce-multilingual/classes/multi-currency/class-wcml-exchange-rates.php* file (line 151).