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.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of CustomOrdersTableController::delete_custom_orders_tables() WC 7.1.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 > Custom data stores)." );
	}

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