Change and Rename Vendor List Page Sorting Options

WCMp has made it easy to default sort your Vendor List page, by adding options in the shortcode. So on my Vendors page, I have this shortcode: [wcmp_vendorslist orderby=”name” order=”ASC”]. This snippet aligns the sort/filter dropdown options for me with how the vendors are sorted by default.

As always, this is either added to your Child Theme’s functions.php file, or consider using the My Custom Functions Pro plugin to manage and organize all your snippets.

add_filter('wcmp_vendor_list_vendor_sort_type', 'change_wcmp_vendor_list_sorting_options');

function change_wcmp_vendor_list_sorting_options($arr) {

    $arr['name'] = __('Sort Vendors A to Z', 'dc-woocommerce-multi-vendor');  //rename
    unset($arr['registered']);  //Remove sorting option for registered by date
    $arr['category'] = __('Filter by Category of Items for Sale', 'dc-woocommerce-multi-vendor');  //rename

return $arr;

Tested and working on Woocommerce 4.6.1, WCMp 3.5.10

Is this no longer relevant or not working? Please let us know in the comments!

Comments on this post

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