Automattic\WooCommerce\Blocks\BlockTypes
ProductNew::set_block_query_args()
Set args specific to this block
Method of the class: ProductNew{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->set_block_query_args( $query_args );
- $query_args(array) (required) (passed by reference — &)
- Query args.
ProductNew::set_block_query_args() ProductNew::set block query args code WC 9.6.1
protected function set_block_query_args( &$query_args ) { $query_args['orderby'] = 'date'; $query_args['order'] = 'DESC'; }