Remove subscriptions button from account navigation
-
No matter what I do, the subscriptions button always reappears on my account navigation.
function remove_menu_items( $menu_links ) { unset ( $menu_links['subscriptions'] ); return $menu_links; } add_filter( 'woocommerce_account_menu_items','remove_menu_items' );
I’ve tried the basic unset ‘subscriptions’ from woocommerce_account_menu_items, but it doesn’t appear to be removed. In fact, when I print out $menu_links, there’s actually no ‘subscriptions’ existing at all.
Note that I have installed woocommerce and woocommerce-subscriptions plugin. From looking at woocommerce-subscriptions code, it seems that ‘subscriptions’ is actually added to the menu after via
add_filter( 'woocommerce_account_menu_items', array( $this, 'add_menu_items' ) );
Is there anyway to call the filter for menu items AFTER the subscriptions have been added via woocommerce-subscriptions plugin?
- The topic ‘Remove subscriptions button from account navigation’ is closed to new replies.