Overview of the Issue
When using Rank Math SEO v1.0.266 with WPML, you might see an admin notice asking you to activate WPML String Translation even when the plugin is already active.
“Please activate the WPML String Transaltion plugin to convert Rank Math Setting values in different languages.”
Workaround
This issue is fixed in Rank Math 1.0.267. Updating solves it on your site, so you only need this workaround if you can’t update yet.
Please, make sure of having a full site backup of your site before proceeding.
- Open the …/wp-content/plugins/seo-by-rank-math/includes/admin/class-notices.php file.
- Look for line 209.
- Replace:
if ( ! function_exists( 'icl_add_string_translation' ) || get_option( 'rank_math_wpml_notice_dismissed' ) ) { return; } $sitepress = Sitepress::get()->get_var(); $setup_complete = $sitepress->get_setting( 'setup_complete', false ); if ( ! $setup_complete ) { return; } - With:
if ( get_option( 'rank_math_wpml_notice_dismissed' ) ) { return; } $WPMLSettings = (array) get_option( 'icl_sitepress_settings' ); $WPMLSetUpComplete = $WPMLSettings['setup_complete'] ?? false; if ( ! $WPMLSetUpComplete || function_exists( 'icl_add_string_translation' ) ) { return; } - Deactivate and reactivate RankMath SEO
Still Seeing This Issue?
If updating doesn’t fix it, ask a support question and we’ll look into it with you.
Ask a support question