Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::delete_custom_orders_tables()privateWC 1.0

Delete the custom orders tables and any related options and data in response to the user pressing the tool button.

Method of the class: CustomOrdersTableController{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->delete_custom_orders_tables();

CustomOrdersTableController::delete_custom_orders_tables() code WC 8.7.0

private function delete_custom_orders_tables() {
	if ( $this->custom_orders_table_usage_is_enabled() ) {
		throw new \Exception( "Can't delete the custom orders tables: they are currently in use (via Settings > Advanced > Features)." );
	}

	delete_option( self::CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION );
	$this->data_synchronizer->delete_database_tables();
}