Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableQuery::process_operational_data_table_query_args()privateWC 1.0

Processes fields related to the operational data table.

Метод класса: OrdersTableQuery{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of OrdersTableQuery::process_operational_data_table_query_args() WC 7.1.0

private function process_operational_data_table_query_args(): void {
	$fields = array_filter(
		array(
			'created_via',
			'woocommerce_version',
			'prices_include_tax',
			'order_key',
			'discount_total_amount',
			'discount_tax_amount',
			'shipping_total_amount',
			'shipping_tax_amount',
		),
		array( $this, 'arg_isset' )
	);

	if ( ! $fields ) {
		return;
	}

	$this->join(
		$this->tables['operational_data'],
		'',
		'',
		'inner',
		true
	);

	foreach ( $fields as $arg_key ) {
		$this->where[] = $this->where( $this->tables['operational_data'], $arg_key, '=', $this->args[ $arg_key ], $this->mappings['operational_data'][ $arg_key ]['type'] );
	}
}