hello,
which is supposed to be the correct namespace to customize the hook and the related nav menu?
use WP_Customize_Nav_Menus; //<--- no clues where to look for :D
add_filter( 'wp_nav_menu_items', __NAMESPACE__ .'add_extra_item_to_nav_menu', 10, 2 );
function add_extra_item_to_nav_menu( $items, $args ) {
if (is_user_logged_in() && $args->menu == 303) {
$items .= '<li><a href="'. get_permalink( get_option('woocommerce_myaccount_page_id') ) .'">My Account</a></li>';
}
elseif (!is_user_logged_in() && $args->menu == 303) {
$items .= '<li><a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">Sign in / Register</a></li>';
}
return $items;
}
tyvm!