To modify query arguments for products.
(array) Query arguments.
includes/shortcode.php
if( !function_exists( 'ultraaddons_table_query_args' ) ){
/**
* Here we are trying to show On backorder product by using this filter
*
* Query args manipulation.
* using Filter Hook: wpto_table_query_args
*
* @param type $query_ars
* @return Array
*/
function ultraaddons_table_query_args( $query_ars ){
$query_ars['meta_query'][] = array(//For Available product online
'key' => '_stock_status',
'value' => 'onbackorder'
);
$query_ars['meta_query']['relation'] = 'OR';
return $query_ars;
}
}
add_filter( 'wpto_table_query_args', 'ultraaddons_table_query_args' );