I found out how to reproduce it. The bug only seems to be present on my local development environment: Laragon.
I installed a fresh copy of WordPress, WooCommerce, and WooCommerce Legacy REST API and the same issue occurred.
I noticed the active plugin has the description: The legacy WooCommerce REST API, which used to be part of WooCommerce itself but is removed as of WooCommerce 9.0.
…which is found in the typical plugin header of woocommerce-legacy-rest-api.php.
The phantom plugin has a different description: The legacy WooCommerce REST API, which is now part of WooCommerce itself but will be removed in WooCommerce 9.0.
…which is found in \includes\class-wc-legacy-rest-api-plugin.php
/**
* Handler for the all_plugins hook, used to change the description of the plugin if it's seen before June 2024.
*/
public static function on_all_plugins( $all_plugins ) {
$plugin_relative_path = str_replace( WP_PLUGIN_DIR . '/', '', self::$plugin_filename );
$all_plugins[ $plugin_relative_path ][ 'Description' ] = 'The legacy WooCommerce REST API, which is now part of WooCommerce itself but will be removed in WooCommerce 9.0.';
return $all_plugins;
}
…which is called by:
// 1717192800 = June 1st, 2024
if( time() < 1717192800 ) {
add_action( 'all_plugins', self::class . '::on_all_plugins' );
}
For some reason, my installation is showing both descriptions.