Automattic\WooCommerce\Internal\Utilities

COTMigrationUtil::get_table_for_orders()publicWC 1.0

Get the name of the database table that's currently in use for orders.

Method of the class: COTMigrationUtil{}

No Hooks.

Return

String.

Usage

$COTMigrationUtil = new COTMigrationUtil();
$COTMigrationUtil->get_table_for_orders();

COTMigrationUtil::get_table_for_orders() code WC 8.7.0

public function get_table_for_orders() {
	if ( $this->custom_orders_table_usage_is_enabled() ) {
		$table_name = OrdersTableDataStore::get_orders_table_name();
	} else {
		global $wpdb;
		$table_name = $wpdb->posts;
	}

	return $table_name;
}