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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 8 replies, has 0 voices.

Last updated by marvinH-9 11 hours, 9 minutes ago.

Assisted by: Osama Mersal.

Author Posts
January 23, 2025 at 8:04 pm #16629730

marvinH-9

Background of the issue:
I have an existing WooCommerce webshop with the following plugins installed: Advanced Custom Fields PRO, Advanced Custom Fields Multilingual, WPML Multilingual CMS, and WPML String Translation. Some of the ACF fields are programmed via PHP as per the reference: hidden link. I am trying to translate my WooCommerce ACF (PHP registered) webshop with WPML auto translations. The site is currently under development.

Symptoms:
My flexible fields are not being recognized by WPML. I followed the documentation at https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/setting-the-translation-preferences-for-acf-fields-created-using-php-code/, and tried steps like changing the PHP code, saving an existing page with flexible fields, and attempting to auto-translate in WPML. However, it only recognizes the title.

Questions:
How can I get WPML to recognize and translate my flexible fields?
What steps should I follow to ensure all ACF fields are translated correctly?

January 26, 2025 at 10:21 am #16634663

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply; it was due to a higher workload.

Please check this page and try the workaround mentioned there.

Kindly let me know if the mentioned workaround fixes the issue.

Best regards,
Osama

February 4, 2025 at 1:26 pm #16666883

marvinH-9

Hi Osama,

Thanks for your answer. I only don't really understand how this workaround would help me in this situation.

Currently my ACF fields are not displaying in the custom fields section in my WordPress account because they're built with PHP.

How could I make the transition to using this the fastest? Which steps do I have to take from my current situation? It sounds like a lot of work to get this working on a short notice.

Best regards,

Marvin

February 4, 2025 at 2:11 pm #16667233

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Marvin,

Please log in to this hidden link">sandbox site and add your fields code. After that, please let me know how to reproduce the issue so I can consult our compatibility team if we have another workaround.

Best regards,
Osama

February 4, 2025 at 6:10 pm #16668180

marvinH-9

Hi Osama,

Thanks for your fast response!

I can log in to the sandbox site, that works good. Only thing is, I don't really see where I have to add the fields code.

I registered it via: acf_add_local_field_group(). So the fields code is living in my theme and registered via functions.php.

Do you want me to share that php file with you? So that your team can find a workaround maybe?

Cheers,

Marvin

February 5, 2025 at 9:28 am #16669647

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Marvin,

Thanks for your reply. Please add the code to the hidden link">functions.php file on the sandbox site.

You can add it using the file manager plugin or Appearance-> Edit theme files.

Thanks,
Osama

February 11, 2025 at 12:26 pm #16691527

marvinH-9

Hi Osama,

Thank you.

I just added my function to register the fields to the functions.php.

Thanks,
Marvin

February 11, 2025 at 2:03 pm #16692037

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Marvin,

Thanks for importing the code to the sandbox site. Please check the following steps:

1- Install this hidden link">plugin
2- Follow its Usage doc to convert the field groups
3- Go hidden link">here and check if all groups are imported correctly
4- Edit each group to see if the translation preferences are correct
5- Go hidden link">here, toggle all group,s and export as JSON

If everything works correctly, you would need to delete the PHP code for the field groups.

Kindly check the result on the sandbox site and let me know if it works as expected.

Best regards,
Osama

February 11, 2025 at 4:35 pm #16692934

marvinH-9

Hi Osama,

Great thanks this works! It looks like WPML is recognising my fields and counts the words right now.

Only problem I get now, if I want to start translating using the WPML translation editor it gives me an error with 'File size limit exceeded', 'unable to retrieve job content'.

I hope you can help me further. I already tried this: https://wpml.org/forums/topic/file-size-limit-exceeded-notification/

Thanks,

Marvin

February 11, 2025 at 4:43 pm #16692970

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Marvin,

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama