This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to run custom actions when translated posts are saved using WPML, but the standard
save_post
hook no longer works after switching to automatic translation.
Solution:
We recommend using WPML-specific hooks that are triggered during the translation process. A useful hook for your case is
wpml_pro_translation_completed
, which fires when an automatic translation is completed. Here's how you can use it:
add_action( 'wpml_pro_translation_completed', function( $post_id ) {// Custom action for translated posts});
If you need to catch updates to translated posts in general, another option is
wpml_sync_duplicate_content
, depending on your specific setup.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.
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 0 reply, has 0 voices.
Last updated by 3 months, 2 weeks ago.
Assisted by: Mihai Apetrei.