Background of the issue:
My Android APP is using REST API call from my blog post and it doesn't show the post after WPML translates. The APP is configured with Language name as directory. With all my properties post is normal but not the blog post. It shows this error on my debug.log: [19-Jul-2024 03:38:04 UTC] PHP Warning: Undefined variable $user_notification in /home/oykx1duor2bp/public_html/fozaz.com/wp-content/plugins/houzi-rest-api/admin/partials/houzi-rest-api-admin-notify.php on line 82 [19-Jul-2024 03:40:03 UTC] PHP Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /home/oykx1duor2bp/public_html/fozaz.com/wp-content/plugins/sitepress-multilingual-cms/inc/taxonomy-term-translation/wpml-term-translation.class.php:133
Symptoms:
PHP Fatal error: Uncaught Error: Object of class WP_Term could not be converted to string in /home/oykx1duor2bp/public_html/fozaz.com/wp-content/plugins/sitepress-multilingual-cms/inc/taxonomy-term-translation/wpml-term-translation.class.php on line 133
Questions:
Why doesn't my blog post show after WPML translates it?
How can I fix the PHP Fatal error related to WP_Term in wpml-term-translation.class.php?
I have manage to debug and fixed the issued from /wp-content/plugins/sitepress-multilingual-cms/inc/taxonomy-term-translation/wpml-term-translation.class.php(199): WPML_Term_Translation->adjust_ttid_for_term_id()
LINE 196
From this
public function term_id_in( $term_id, $lang_code, $original_fallback = false ) {