plugin updates

This commit is contained in:
Tony Volpe
2024-09-17 10:43:54 -04:00
parent 44b413346f
commit b7c8882c8c
1359 changed files with 58219 additions and 11364 deletions

View File

@@ -34,6 +34,7 @@ class WC_CLI {
require_once __DIR__ . '/cli/class-wc-cli-tracker-command.php';
require_once __DIR__ . '/cli/class-wc-cli-com-command.php';
require_once __DIR__ . '/cli/class-wc-cli-com-extension-command.php';
$this->maybe_include_blueprint_cli();
}
/**
@@ -50,6 +51,24 @@ class WC_CLI {
WP_CLI::add_hook( 'after_wp_load', array( $cli_runner, 'register_commands' ) );
$cli_runner = wc_get_container()->get( ProductAttributesLookupCLIRunner::class );
WP_CLI::add_hook( 'after_wp_load', fn() => \WP_CLI::add_command( 'wc palt', $cli_runner ) );
if ( class_exists( \Automattic\WooCommerce\Blueprint\Cli::class ) ) {
WP_CLI::add_hook( 'after_wp_load', 'Automattic\WooCommerce\Blueprint\Cli::register_commands' );
}
}
/**
* Include Blueprint CLI if it's available.
*/
private function maybe_include_blueprint_cli() {
if ( ! function_exists( 'wc_admin_get_feature_config' ) ) {
require_once WC_ABSPATH . 'includes/react-admin/feature-config.php';
}
$features = wc_admin_get_feature_config();
if ( isset( $features['blueprint'] ) ) {
require_once dirname( WC_PLUGIN_FILE ) . '/vendor/woocommerce/blueprint/src/Cli.php';
}
}
}