WC_Install::verify_base_tablespublic staticWC 1.0

Check if all the base tables are present, updating the stored schema status accordingly.

Method of the class: WC_Install{}

No Hooks.

Returns

String[]. List of missing table names.

Usage

$result = WC_Install::verify_base_tables( $modify_notice, $execute );
$modify_notice(true|false)
Whether to modify notice based on if all tables are present.
Default: true
$execute(true|false)
Whether to execute get_schema queries as well.
Default: false

WC_Install::verify_base_tables() code WC 11.0.1

public static function verify_base_tables( $modify_notice = true, $execute = false ) {
	if ( $execute ) {
		self::create_tables();
	}

	$missing_tables = self::get_missing_base_tables();

	if ( 0 < count( $missing_tables ) ) {
		update_option( 'woocommerce_schema_missing_tables', $missing_tables );
	} else {
		if ( $modify_notice ) {
			WC_Admin_Notices::remove_notice( 'base_tables_missing' );
		}
		update_option( 'woocommerce_schema_version', WC()->db_version );
		delete_option( 'woocommerce_schema_missing_tables' );
	}
	return $missing_tables;
}