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?
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.
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.