← All changes
|
includes/integrations/class-google-search-console-client.php
+6
-1
2.14.1
→
2.14.2
View file →
| @@ -101,10 +101,15 @@ | ||
| 101 | 101 | // Check if the site is already verified by listing sites |
| 102 | 102 | $sites = $this->list_sites(); |
| 103 | 103 | $site_verified = false; |
| 104 | 104 | |
| 105 | + // A domain property is compared in its punycode form, so an IDN | |
| 106 | + // matches whichever form the account lists it in. | |
| 107 | + $wanted = \ThinkRank\Core\Url_Validator::search_console_domain_property($site_url) ?? $site_url; | |
| 108 | + | |
| 105 | 109 | foreach ($sites['siteEntry'] ?? [] as $site) { |
| 106 | - if ($site['siteUrl'] === $site_url) { | |
| 110 | + $listed = (string) ($site['siteUrl'] ?? ''); | |
| 111 | + if ($listed === $site_url || (\ThinkRank\Core\Url_Validator::search_console_domain_property($listed) ?? $listed) === $wanted) { | |
| 107 | 112 | $site_verified = true; |
| 108 | 113 | break; |
| 109 | 114 | } |
| 110 | 115 | } |