fix merge conflits

This commit is contained in:
Ron Rennick 2020-06-15 13:17:32 -03:00 committed by vedanshujain
parent 84b96bfa3e
commit 3d205dbd4a
1 changed files with 14 additions and 0 deletions

View File

@ -583,6 +583,20 @@ class WC_REST_System_Status_Tools_V2_Controller extends WC_REST_Controller {
$message = __( 'Template cache cleared.', 'woocommerce-rest-api' );
} else {
$message = __( 'The active version of WooCommerce does not support template cache clearing.', 'woocommerce-rest-api' );
case 'verify_db_tables':
if ( ! method_exists( 'WC_Install', 'verify_base_tables' ) ) {
$message = __( 'You need WooCommerce 4.2 or newer to run this tool.', 'woocommerce-rest-api' );
$ran = false;
break;
}
// Try to manually create table again.
$missing_tables = WC_Install::verify_base_tables( true, true );
if ( 0 === count( $missing_tables ) ) {
$message = __( 'Database verified successfully.', 'woocommerce-rest-api' );
} else {
$message = __( 'Verifying database... One or more tables are still missing: ', 'woocommerce-rest-api' );
$message .= implode( ', ', $missing_tables );
$ran = false;
}
break;