Skip to content

Instantly share code, notes, and snippets.

@chrdesigner
Created April 14, 2015 13:56
Show Gist options
  • Save chrdesigner/c18bbf95da4d1aebbfb8 to your computer and use it in GitHub Desktop.
Save chrdesigner/c18bbf95da4d1aebbfb8 to your computer and use it in GitHub Desktop.
Remove Options - alphabet order - WooCommerce
<?php
// Remove Options
add_filter( 'woocommerce_catalog_orderby', 'custom_woocommerce_remove_filter' );
function custom_woocommerce_remove_filter( $catalog_orderby ) {
unset( $catalog_orderby['popularity'] );
unset( $catalog_orderby['rating'] );
unset( $catalog_orderby['price'] );
unset( $catalog_orderby['price-desc'] );
return $catalog_orderby;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment