WC_Shortcode_Products::set_sale_products_query_args()
Set sale products query args.
Method of the class: WC_Shortcode_Products{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->set_sale_products_query_args( $query_args );
- $query_args(array) (required) (passed by reference — &)
- Query args.
Changelog
Since 3.2.0 | Introduced. |
WC_Shortcode_Products::set_sale_products_query_args() WC Shortcode Products::set sale products query args code WC 9.3.3
protected function set_sale_products_query_args( &$query_args ) { $query_args['post__in'] = array_merge( array( 0 ), wc_get_product_ids_on_sale() ); }