diff --git a/projects/packages/connection/changelog/update-tracker_send_on_init b/projects/packages/connection/changelog/update-tracker_send_on_init new file mode 100644 index 0000000000000..007974bcd7bad --- /dev/null +++ b/projects/packages/connection/changelog/update-tracker_send_on_init @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Package Version Tracker: send package versions to wpcom on the init hook instead of plugins_loaded diff --git a/projects/packages/connection/src/class-manager.php b/projects/packages/connection/src/class-manager.php index 64ab116d8176a..9aea45e0be3ed 100644 --- a/projects/packages/connection/src/class-manager.php +++ b/projects/packages/connection/src/class-manager.php @@ -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' ) );