This commit is contained in:
Javier Casares 2026-08-18 10:48:13 +00:00
commit 5589c54b9b
13 changed files with 138 additions and 58 deletions

View file

@ -273,7 +273,7 @@ class Robotstxt_Manager_Updater {
* @return bool True when a usable key exists.
*/
private function has_api_key(): bool {
$api_key_raw = get_option( 'robotstxt_manager_api_key', '' );
$api_key_raw = get_site_option( 'robotstxt_manager_api_key', '' );
$api_key = is_string( $api_key_raw ) ? Robotstxt_Manager_Encryption::decrypt( $api_key_raw ) : '';
return '' !== $api_key;
@ -308,7 +308,7 @@ class Robotstxt_Manager_Updater {
$args['token'] = $token;
} else {
// Fallback (older Core): the API key itself.
$api_key_raw = get_option( 'robotstxt_manager_api_key', '' );
$api_key_raw = get_site_option( 'robotstxt_manager_api_key', '' );
$api_key = is_string( $api_key_raw ) ? Robotstxt_Manager_Encryption::decrypt( $api_key_raw ) : '';
if ( '' !== $api_key ) {