Use \WC_Install class as Install class has been removed
This commit is contained in:
parent
d85acf8251
commit
5fbaa72b61
|
@ -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 ) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue