wpgenie

remove my tickets from my account menu

Feb 7th, 2022 (edited)
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. /*
  2.  
  3. remove my tickets from my account menu
  4.  
  5. this code snippet should be used in child theme's functions.php file
  6.  
  7. */
  8. add_filter ( 'woocommerce_account_menu_items', 'wpg_remove_my_tickets_link' );
  9. function wpg_remove_my_tickets_link( $menu_links ){
  10.    
  11.     unset( $menu_links['comp-tickets'] ); // My Tickets
  12.    
  13.     // examples
  14.     //unset( $menu_links['dashboard'] ); // Remove Dashboard
  15.     //unset( $menu_links['payment-methods'] ); // Remove Payment Methods
  16.     //unset( $menu_links['orders'] ); // Remove Orders
  17.     //unset( $menu_links['downloads'] ); // Disable Downloads
  18.     //unset( $menu_links['edit-account'] ); // Remove Account details tab
  19.     //unset( $menu_links['customer-logout'] ); // Remove Logout link
  20.    
  21.     return $menu_links;
  22.    
  23. }
Add Comment
Please, Sign In to add comment