Automattic\WooCommerce\Internal\Admin\Reports

HposLegacyOrderReportQueryBuilder::build_order_items_join │ private │ WC 1.0

Build the JOIN onto wp_woocommerce_order_items.

Method of the class: HposLegacyOrderReportQueryBuilder{}

No Hooks.

Returns

array<string,string>. JOIN keyed by alias.

Usage

// private - for code of main (parent) class only
$result = $this->build_order_items_join( $join_type );
$join_type(string) (required)
Join type.

HposLegacyOrderReportQueryBuilder::build_order_items_join() code WC 11.1.2

private function build_order_items_join( $join_type ) {
	global $wpdb;
	return array(
		'order_items' => "{$join_type} JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON orders.id = order_items.order_id",
	);
}