Use \WC_Install class as Install class has been removed

This commit is contained in:
Lourens Schep 2022-05-27 10:17:55 -03:00
parent d85acf8251
commit 5fbaa72b61
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,5 @@
<?php
use Automattic\WooCommerce\Admin\Install;
use Automattic\WooCommerce\Admin\API\Reports\Cache;
register_woocommerce_admin_test_helper_rest_route(
@ -26,7 +25,7 @@ register_woocommerce_admin_test_helper_rest_route(
);
function tools_get_wc_admin_versions() {
$db_updates = Install::get_db_update_callbacks();
$db_updates = \WC_Install::get_db_update_callbacks();
return new WP_REST_Response( array_keys( $db_updates ), 200 );
}
@ -37,7 +36,7 @@ function trigger_selected_update_callbacks( $request ) {
return;
}
$db_updates = Install::get_db_update_callbacks();
$db_updates = \WC_Install::get_db_update_callbacks();
$update_callbacks = $db_updates[ $version ];
foreach ( $update_callbacks as $update_callback ) {

View File

@ -5,7 +5,7 @@ register_woocommerce_admin_test_helper_rest_route(
);
function tools_trigger_wca_install() {
Automattic\WooCommerce\Admin\Install::install();
\WC_Install::install();
return true;
}