WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats

Segmenter::get_segment_selections_product_level() protected WC 1.0

Returns column => query mapping to be used for product-related product-level segmenting query (e.g. coupon discount amount for product X when segmenting by product id or category).

{} It's a method of the class: Segmenter{}

No Hooks.

Return

Array. Column => SELECT query mapping.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_segment_selections_product_level( $products_table );
$products_table(string) (required)
Name of SQL table containing the product-level segmenting info.

Code of Segmenter::get_segment_selections_product_level() WC 6.1.0

protected function get_segment_selections_product_level( $products_table ) {
	$columns_mapping = array(
		'amount' => "SUM($products_table.coupon_amount) as amount",
	);

	return $columns_mapping;
}