You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometime some theme or plugin can affect that table's sorting is not working.
Then you can use following code snippet.
Add this code in your child-theme's functions.php file or you can add by any code snippet adding plugin.
Code:
add_filter('wpt_query_args','wpt_custom_price_wise_sorting_fixer');
/** * If anybody fond that, Price wise sorting is not working for your site * Need to customize product table's args * using filter hook: add_filter('wpt_query_args','wpt_custom_price_wise_sorting_fixer'); * ******************** * wpt_query_args * Very strong filter for Woo Product Table * * @author Saiful Islam <[email protected]> * * @link https://wordpress.org/plugins/woo-product-table/ * @link https://github.com/codersaiful/woo-product-table * @param array $args default array of woo product table. * @return array */functionwpt_custom_price_wise_sorting_fixer($args){
$args['meta_query'][] = [
'key' => '_price',
'compare'=> 'EXISTS',
];
$args['orderby'] = 'meta_value_num';
$args['order'] = 'ASC';
return$args;
}
The text was updated successfully, but these errors were encountered:
Sometime some theme or plugin can affect that table's sorting is not working.
Then you can use following code snippet.
Add this code in your child-theme's functions.php file or you can add by any code snippet adding plugin.
Code:
The text was updated successfully, but these errors were encountered: