Изменить вывод сортировки товаров

Добавить в function.php темы

// Сортировка товаров, убираем стандартный вывод
function woo_catalog_orderby( $orderby ) {
    unset($orderby["name-list"]); // Сортировка по популярности
    unset($orderby["popularity"]); // Сортировка по популярности
    unset($orderby["rating"]); // Сортировка по рейтингу
    unset($orderby["date"]);    // Сортировка по дате
    unset($orderby["title"]);	 // Сортировка по названию
    unset($orderby["menu_order"]); // Сортировка по умолчанию (можно определить порядок в админ панели)
    return $orderby;
}
add_filter( "woocommerce_catalog_orderby", "woo_catalog_orderby", 20 );

// Сортировка по названию
add_filter( 'woocommerce_get_catalog_ordering_args', 'woocommerce_get_catalog_ordering_name_args' );
 
function woocommerce_get_catalog_ordering_name_args( $args ) {
    if (isset($_GET['orderby'])) {
        switch ($_GET['orderby']) :
            case 'name_list_asc' :
                $args['orderby'] = 'title';
                $args['order'] = 'ASC';
                $args['meta_key'] = '';
            break;
            case 'name_list_desc' :
                $args['orderby'] = 'title';
                $args['order'] = 'DESC';
                $args['meta_key'] = '';               
            break;
        endswitch;
    }
 
	return $args;
}
// Сортировка по популярности
function woocommerce_get_catalog_ordering_popular_args( $args ) {
    global $wp_query;
    if (isset($_GET['orderby'])) {
        switch ($_GET['orderby']) :
            case 'popularity_asc' :
                $args['orderby'] = 'meta_value';
                $args['order'] = 'ASC';
                $args['meta_key'] = 'total_sales';
            break;
            case 'popularity_desc' :
                $args['orderby'] = 'meta_value';
                $args['order'] = 'DESC';
                $args['meta_key'] = 'total_sales';             
            break;
        endswitch;
    }

	return $args;
}
add_filter( 'woocommerce_get_catalog_ordering_args', 'woocommerce_get_catalog_ordering_popular_args' );

Весь код файла /woocommerce/templates/loop/orderby.php

<?php
/**
 * Show options for ordering
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/loop/orderby.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see         https://docs.woocommerce.com/document/template-structure/
 * @package     WooCommerce/Templates
 * @version     3.6.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<form class="woocommerce-ordering" method="get">
	<select name="orderby" class="orderby" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
		<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
			<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
		<?php endforeach; ?>
	</select>
	<input type="hidden" name="paged" value="1" />
	<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
</form>
<div class="orderby-block">
	<?php
	    switch ($_GET['orderby']) :
            case 'name_list_asc' :
				echo '	<div class="namesort"><a href="?orderby=name_list_desc" class="orderby-link orderby-asc-active">по названию</a></div>';
            break;
            case 'name_list_desc' :
				echo ' <div class="namesortup"><a href="?orderby=name_list_asc" class="orderby-link orderby-desc-active">по названию</a></div>';
			break;
			default:
			echo '<div class="namesortstart"><a href="?orderby=name_list_asc" class="orderby-link">по названию</a></div>';
		endswitch;	

        switch ($_GET['orderby']) :
            case 'popularity_desc' :
				echo '	<div class="popsort"><a href="?orderby=popularity_asc" class="orderby-link orderby-desc-active">по популярности</a></div>';
            break;
            case 'popularity_asc' :
				echo '<div class="popsortup"><a href="?orderby=popularity_desc" class="orderby-link orderby-asc-active">по популярности</a></div>';
			break;
			default:
			echo '<div class="popsortstart"><a href="?orderby=popularity_asc" class="orderby-link">по популярности</a></div>';
		endswitch;	
		
?>
	</div>

Стили

select {
    min-height: 2em;
    line-height: 2em;
    height: 2em;
}
.w-post-elm.product_ordering.us_custom_2774bef1 {
	display: inline-flex;
}
.orderby-link.orderby-asc-active, .orderby-link.orderby-desc-active {
	border-bottom: 1px solid #222;
}
.namesort, .namesortup, .popsort, .popsortup, .namesortstart, .popsortstart, .pricesort, .pricesortup, .pricesortstart {
	margin: 0 20px;
}
.orderby-block {
	display: inline-flex;
}
.namesort:before, .popsort:before, .namesortstart:before, .popsortstart:before, .pricesort:before, .pricesortstart:before {
	content: '\f175';
    font-family: 'fontawesome';
	float: right;
    margin-right: -10px;
    font-size: 11px;
    font-weight: 600;
}
.namesortup:before, .popsortup:before, .pricesortup:before {
	content: '\f176';
    font-family: 'fontawesome';
	float: right;
    margin-right: -10px;
    font-size: 11px;
    font-weight: 600;
}