sorry i could not get it back.
if you check there code which adds subscriptions endpoint
/**
* Insert the new endpoint into the My Account menu.
*
* @param array $items
* @return array
*/
public function add_menu_items( $menu_items ) {
// If the Subscriptions endpoint setting is empty, don't display it in line with core WC behaviour.
if ( empty( $this->query_vars['subscriptions'] ) ) {
return $menu_items;
}
if ( 1 === count( wcs_get_users_subscriptions() ) && apply_filters( 'wcs_my_account_redirect_to_single_subscription', true ) ) {
$label = __( 'My Subscription', 'woocommerce-subscriptions' );
} else {
$label = __( 'Subscriptions', 'woocommerce-subscriptions' );
}
// Add our menu item after the Orders tab if it exists, otherwise just add it to the end
if ( array_key_exists( 'orders', $menu_items ) ) {
$menu_items = wcs_array_insert_after( 'orders', $menu_items, 'subscriptions', $label );
} else {
$menu_items['subscriptions'] = $label;
}
return $menu_items;
}
Means it should either be added after orders tab or at the end. also this menu is not available without any condition for wc_get_account_menu_items function that is why our plugin could not detect it.
Hope it clears
-
This reply was modified 11 months, 1 week ago by SysBasics.
-
This reply was modified 11 months, 1 week ago by SysBasics.