Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needs to automate the 'Set prices in other currencies manually' option for all new and existing products in their WooCommerce store. Manually setting this for over 5000 products is not feasible.
Solution:
We recommend implementing a custom code solution, as WooCommerce Multilingual does not support this functionality by default. For new products, adapt the code by changing the value for

get_post_type($post_id)

and the

'post_type'

argument to product. The rest of the code remains unchanged. You can find a similar code example and further instructions here: https://wpml.org/forums/topic/can-i-set-set-prices-in-other-currencies-manually-as-default-on-the-product-page/#post-15771848

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 https://wpml.org/forums/forum/english-support/.

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 Prosenjit Barman 1 week, 3 days ago.

Assisted by: Prosenjit Barman.

Author Posts
December 2, 2024 at 1:00 am #16463983

katarzynaT-5

Background of the issue:
I am trying to automate a specific setting for my products on my site hidden link. I want every newly added product to automatically have the 'Set prices in other currencies manually' option enabled for currency settings. I plan to handle price adjustments using CSV import/export to update prices for these products across different currencies. I have over 5000 products in my store, and setting this option manually for each product would take an unmanageable amount of time.

Symptoms:
No specific issue or error message mentioned.

Questions:
How can I automate enabling the 'Set prices in other currencies manually' option for all new products by default?
How can I apply this setting to my existing products in bulk without having to manually adjust each one?

December 2, 2024 at 8:11 am #16464459

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thanks for contacting WPML Support.

I understand your requirement. Currently, WooCommerce Multilingual does not include a built-in feature to set a default price option. However, I’ve worked on a similar case where the user wanted to set the "prices in other currencies manually" option default for variations. To achieve that functionality, it was needed to write a few lines of custom code. Please review the response below for a detailed explanation of the process to implement this solution.

- https://wpml.org/forums/topic/can-i-set-set-prices-in-other-currencies-manually-as-default-on-the-product-page/#post-15771848

Since you're looking for a similar solution, you can use the provided code. The solution includes adjustments for existing code as well. However, it specifically targets variations. To adapt it for products, you can change the value for `"get_post_type($post_id)"` and the `'post_type'` argument to `product`. The rest of the code remains unchanged.

Please try and let me know how it goes. If you need further assistance or clarification on any particular step, I'll be happy to help.

Best regards,
Prosenjit