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 2 replies, has 2 voices.

Last updated by oleksiiD-3 1 year, 7 months ago.

Assisted by: Bigul.

Author Posts
September 12, 2023 at 2:09 pm #14384453

oleksiiD-3

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.

September 13, 2023 at 4:58 pm #14391761

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

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.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

September 14, 2023 at 7:42 am #14394197

oleksiiD-3

It appeared that I had to update my products and the issue was solved.

September 14, 2023 at 8:39 am #14394709

oleksiiD-3

It appeared that I had to update my products and the issue was solved.