Automattic\WooCommerce\Internal\Utilities
COTMigrationUtil::get_table_for_orders
Get the name of the database table that's currently in use for orders.
Method of the class: COTMigrationUtil{}
No Hooks.
Returns
String.
Usage
$COTMigrationUtil = new COTMigrationUtil(); $COTMigrationUtil->get_table_for_orders();
COTMigrationUtil::get_table_for_orders() COTMigrationUtil::get table for orders code WC 10.5.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;
}