Skip to content

Commit c6dd336

Browse files
gzioloclaude
andcommitted
Connectors: Run settings registration and key passing on init at priority 20.
This ensures plugins registering AI providers at default priority have completed before connector settings are built from the registry. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 391ea07 commit c6dd336

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-includes/connectors.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ function _wp_register_default_connector_settings(): void {
340340
add_filter( "option_{$setting_name}", '_wp_connectors_mask_api_key' );
341341
}
342342
}
343-
add_action( 'init', '_wp_register_default_connector_settings' );
343+
add_action( 'init', '_wp_register_default_connector_settings', 20 );
344344

345345
/**
346346
* Passes stored connector API keys to the WP AI client.
@@ -375,7 +375,7 @@ function _wp_connectors_pass_default_keys_to_ai_client(): void {
375375
wp_trigger_error( __FUNCTION__, $e->getMessage() );
376376
}
377377
}
378-
add_action( 'init', '_wp_connectors_pass_default_keys_to_ai_client' );
378+
add_action( 'init', '_wp_connectors_pass_default_keys_to_ai_client', 20 );
379379

380380
/**
381381
* Exposes connector settings to the connectors-wp-admin script module.

0 commit comments

Comments
 (0)