Skip Navigation

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 day, 14 hours 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