Skip to content

Commit

Permalink
[not verified] Connection: send package versions on init hook (#21173)
Browse files Browse the repository at this point in the history
Fixes #21165

Send the package versions to wpcom on the init hook instead of plugins loaded
to prevent a conflict with a third party plugin. The plugin isn't ready until the
'after_setup_theme' action has fired.

Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Samiff <[email protected]>
  • Loading branch information
3 people authored and retrofox committed Oct 1, 2021
1 parent d208832 commit ef42d42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Package Version Tracker: send package versions to wpcom on the init hook instead of plugins_loaded
2 changes: 1 addition & 1 deletion projects/packages/connection/src/class-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function configure() {

if ( $manager->is_connected() ) {
add_filter( 'xmlrpc_methods', array( $manager, 'public_xmlrpc_methods' ) );
add_filter( 'plugins_loaded', array( new Package_Version_Tracker(), 'maybe_update_package_versions' ) );
add_filter( 'init', array( new Package_Version_Tracker(), 'maybe_update_package_versions' ) );
}

add_action( 'rest_api_init', array( $manager, 'initialize_rest_api_registration_connector' ) );
Expand Down

0 comments on commit ef42d42

Please sign in to comment.