PHP WordPress WooCommerce
WooCommerce - Changing Sorting Options
517 days agoThe code below shows you how to alter sorting options for product archive.
<?php
add_filter( 'woocommerce_catalog_orderby', 'hoog_alter_sorting_options' );
function hoog_alter_sorting_options( $options ) {
// Unsetting
unset( $options['rating'] );
return $options;
// Renaming
$options['price'] = 'Sort by price (asc)';
return $options;
}
