Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableQuery::get_table_name()publicWC 1.0

Returns the name of one of the OrdersTableDatastore tables.

Method of the class: OrdersTableQuery{}

No Hooks.

Return

String. The prefixed table name.

Usage

$OrdersTableQuery = new OrdersTableQuery();
$OrdersTableQuery->get_table_name( $table_id ): string;
$table_id(string)
Table identifier. One of 'orders', 'operational_data', 'addresses', 'meta'.
Default: ''

OrdersTableQuery::get_table_name() code WC 8.7.0

public function get_table_name( string $table_id = '' ): string {
	if ( ! isset( $this->tables[ $table_id ] ) ) {
		// Translators: %s is a table identifier.
		throw new \Exception( sprintf( __( 'Invalid table id: %s.', 'woocommerce' ), $table_id ) );
	}

	return $this->tables[ $table_id ];
}