I am developing a plugin extension for WPML to streamline translation creation from a single interface. However, I’ve encountered an issue: when updating post statuses in a loop, everything works fine for the original post, but when I attempt to update a translation (not the original), the translation gets deleted after the second iteration of the loop.
error_log("TRID is missing for element ID: $updated_post_id");
}
}
return null;
}
On the first iteration, the translation updates correctly. However, on the next loop iteration, the translation is deleted, and I cannot figure out why this happens. I’ve added error logs for debugging, but they don’t provide a clear explanation.
Could you help clarify why the translation might be deleted during updates using wp_update_post and do_action('wpml_set_element_language_details')? Perhaps I am missing an essential step in working with the WPML API.
Thank you in advance for your assistance!
Symptoms:
On the first iteration, the translation updates correctly. However, on the next loop iteration, the translation is deleted.
Questions:
Could you help clarify why the translation might be deleted during updates using wp_update_post and do_action('wpml_set_element_language_details')?
Perhaps I am missing an essential step in working with the WPML API.
Das Thema '[Geschlossen] Issue with Post Status Updates in WPML Extension Development' ist für neue Antworten geschlossen.