This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing a Yoast license issue on your WordPress site. Specifically, the license works on the primary language site but not on the secondary language (French) site. This discrepancy arises because the WordPress and Site addresses for the original language settings are the same, but they differ in the secondary language. Solution: If you're experiencing this issue, we suggest verifying the domains and updating your Yoast account accordingly. In doubt please consult the Yoast support team.
Please note that this solution might be outdated or not applicable to your specific 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 the problem persists, please open a new support ticket at WPML support forum for further assistance.
0% of people find this useful.
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.
Background of the issue:
I am trying to fix a Yoast license issue on my WordPress site.
Symptoms:
There is a problem with the Yoast license on my site.
Questions:
On the original language WordPress settings, the WordPress and Site addresses are the same, but on the secondary site language (French), they are not. Why?
That area is related to WordPress, and those separate URLs might come either from the site setup or from some data inside the database.
Usually, we have the same exact link there, not separate ones.
I recommend running a full website backup first and then trying to manually edit the other link so that you have only one link, like in the default language.
I'm not sure why there are two separate URLs but I guess you own both of them, right? I mean, they are related somehow to you, just trying to make sure that your site was not hacked or something like this 🙂
>I'm not sure why there are two separate URLs but I guess you own both of them, right?<
Is your question real? Tell me you have not been hacked.
I have a bilingual site with separate domains, one in English (home-alarm.ca) and one in French (alarme-maison.ca).
home-alarm.ca once translated becomes alarme-maison.ca.
I don't suppose you speak French.
Anyhow, I just changed the site URL for alarme-maison.ca. And when I go back to the WordPress settings for home-alarm.ca, the same French domain now appears as the site URL, therefore a mismatch.
You do realize I have been talking to the Yoast support team all along about this. They blamed my WordPress->General URL's not matching. But, I have to admit, I only have one single license. I have to switch back between home-alarm.ca and alarme-maison.ca though.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I took a look into the Yoast plugin and they have a dedicated filter hook that gets the site URL when WPML is used.
You could try to add this snippet to the functions.php file of a Child Theme or a Code Snippet Plugin:
public function filter_home_url_before() {
\add_filter( 'wpml_get_home_url', [ $this, 'wpml_get_home_url' ], 10, 2 );
}
public function wpml_get_home_url( $url, $language ) {
// Get the current language using WPML filter
$current_language = apply_filters( 'wpml_current_language', NULL );
// Check the current language code (this can be dynamic for different languages)
switch ( $current_language ) {
case 'en': // English
return '<em><u>hidden link</u></em>';
case 'fr': // French
return '<em><u>hidden link</u></em>';
// Add more cases for other languages as needed
default:
return $url; // Default to the original URL if no match
}
}