How to change default product sort order in WooCommerce Product Category

add_filter('woocommerce_get_catalog_ordering_args', 'am_woocommerce_catalog_orderby');
function am_woocommerce_catalog_orderby( $args ) {
    $args['meta_key'] = '_price';
    $args['orderby'] = 'meta_value_num';
    $args['order'] = 'desc'; 
    return $args;
}

Leave a Reply

Your email address will not be published. Required fields are marked *