WC_Install::verify_base_tables()public staticWC 1.0

Check if all the base tables are present.

{} It's a method of the class: WC_Install{}

No Hooks.

Return

Array. List of queries.

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

Code of WC_Install::verify_base_tables() WC 6.7.0

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

	$missing_tables = wc_get_container()
		->get( DatabaseUtil::class )
		->get_missing_tables( self::get_schema() );

	if ( 0 < count( $missing_tables ) ) {
		if ( $modify_notice ) {
			WC_Admin_Notices::add_notice( 'base_tables_missing' );
		}
		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;
}