daily pastebin goal
75%
SHARE
TWEET

WooCommerce - Remove My Account menu items

lorro Mar 18th, 2018 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // WooCommerce - Remove My Account menu items
  3. add_filter ( 'woocommerce_account_menu_items', 'remove_my_account_items' );
  4. function remove_my_account_items( $menu_links ) {
  5.   // unset( $menu_links['dashboard'] );
  6.   // unset( $menu_links['orders'] );
  7.   unset( $menu_links['downloads'] );
  8.   // unset( $menu_links['edit-address'] );
  9.   unset( $menu_links['payment-methods'] );
  10.   // unset( $menu_links['edit-account'] );
  11.   // unset( $menu_links['customer-logout'] );
  12.   return $menu_links;
  13. }
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