WC_Install::drop_tables()public staticWC 1.0

Drop WooCommerce tables.

Method of the class: WC_Install{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Install::drop_tables();

WC_Install::drop_tables() code WC 9.4.2

public static function drop_tables() {
	global $wpdb;

	$tables = self::get_tables();

	foreach ( $tables as $table ) {
		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
		$wpdb->query( "DROP TABLE IF EXISTS {$table}" );
		// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
	}
}