• Resolved devalexdev

    (@devalexdev)


    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?

Viewing 1 replies (of 1 total)
  • Thread Starter devalexdev

    (@devalexdev)

    Nevermind, I resolved this by adding a lower priority to my own add filter (99) and now it works

Viewing 1 replies (of 1 total)
  • The topic ‘Remove subscriptions button from account navigation’ is closed to new replies.