Automattic\WooCommerce\Admin\API\Reports\Coupons

DataStore::get_included_coupons_array()protectedWC 1.0

Returns an array of ids of included coupons, based on query arguments from the user.

Method of the class: DataStore{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_included_coupons_array( $query_args );
$query_args(array) (required)
Parameters supplied by the user.

DataStore::get_included_coupons_array() code WC 9.3.3

protected function get_included_coupons_array( $query_args ) {
	if ( isset( $query_args['coupons'] ) && is_array( $query_args['coupons'] ) && count( $query_args['coupons'] ) > 0 ) {
		return $query_args['coupons'];
	}
	return array();
}