Hi! I am using Advanced custom fields Multilingual and WPML, please explain me how to use it properly. My ACF fields don't work with translated copy of woocommerce products. Let me explain using this example:
What I do to make it work:
$original_id = apply_filters( 'wpml_object_id', $element_id, $element_type, true, 'en' );
$foo = get_field('field_name', $original_id);
What I want to do instead:
$foo = get_field('field_name');
I feel that the first approach is wrong but the second one returns 'null' on translated product.
In the options of field groups I've set to 'Same fields across languages'
Please explain me how to apply values of custom fields to translated posts, products etc.
Welcome to the WPML support forum. I will do my best to help you to resolve the issue. A couple of requests for tracking this.
1) Please let us know the exact steps to reproduce the issue on your site. It would be great if you could share a couple of screenshots or a screencast for a better understanding.
2) Please fill the private details fields after a full site backup{mandatory}. I would like to access the admin area of your site for further checking. Refer to the following links for more details about our private information sharing policies.
It appeared that I had to update my products and the issue was solved.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.