WOOF - WooCommerce Products Filter

woof_get_terms_orderby

Uses for ordering terms in the search form.

  • classes/helper.php
  • public static function get_terms

Used in pair with woof_get_terms_order

add_filter('woof_get_terms_orderby', function($taxonomy)
    {
        if ($taxonomy == 'pa_size')
        {
            return 'term_id';
        }
    }, 1, 1);