Skip to content Skip to sidebar

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
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by Angeloca 1 year, 5 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
January 29, 2024 at 10:22 am #15237268

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I received the following feedback.


We copy the custom field at a later stage after saving the post. The logic is executed upon two hooks - "wpml_after_save_post" and "wpml_pro_translation_completed" but to be sure you can use this one "wpml_after_copy_custom_field".

wpml_pro_translation_completed is an undocumented hook. So, you will need to check the code in WPML Core inc/translation-jobs/helpers/wpml-save-translation-data-action.class.php to know more about it.

I tried with wpml_pro_translation_completed in staging and it seems to be working for translations, so you can check, remember this will only work for translations so you will need to modify your code to check if it's translations or not and run functions accordingly.

Please try this and see if it helps.

Thanks

January 31, 2024 at 4:46 pm #15250583

Angeloca

Hi Shekhar, thank you.

I'll try this and write back asap.

The topic ‘[Closed] Advanced Translation Editor and wp_after_insert_post hook’ is closed to new replies.