Need a unique gift idea?
A Pastebin account makes a great Christmas gift

WooCommerce - Customise shop orderby options

lorro Jan 9th, 2017 68 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. // Edit WooCommerce dropdown menu item of shop page
  2. // Default options: menu_order, popularity, rating, date, price, price-desc
  4. add_filter( "woocommerce_catalog_orderby", "custom_catalog_orderby", 20 );
  5. function custom_catalog_orderby( $orderby_options ) {
  6.   unset( $orderby_options["price"] );
  7.   unset( $orderby_options["price-desc"] );
  8.   return $orderby_options;
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand