WC_Install::drop_tables
Drop WooCommerce tables.
Method of the class: WC_Install{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Install::drop_tables();
WC_Install::drop_tables() WC Install::drop tables code WC 10.5.0
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
}
}