daily pastebin goal
7%
SHARE
TWEET

WooCommerce - Customise shop orderby options

lorro Jan 9th, 2017 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Edit WooCommerce dropdown menu item of shop page
  2. // Default options: menu_order, popularity, rating, date, price, price-desc
  3.  
  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
 
Top