Problem: If you're experiencing a PHP warning stating 'foreach() argument must be of type array|object, null given' in the AutomaticTranslationJobCreationFailureNotice.php file when activating the WPML Multilingual CMS plugin, we can help you resolve this. Solution: First, ensure you have a full backup of your website. Then, follow these steps: 1. Navigate to Plugins > Plugin File Editor. 2. Open the /wp-content/plugins/sitepress-multilingual-cms/classes/automatic-translation/AutomaticTranslationJobCreationFailureNotice.php file. 3. Find the following line of code:
This modification should resolve the PHP warning. If this solution does not apply to your situation, or if it becomes outdated, 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 issues persist, please open a new support ticket.