You can work with is_user_logged_in()
function to create a if / else
statement in your menu.
Here a quick code.
<?php
if ( is_user_logged_in() ) {
?>
<li class="menu-item"><a href="https://website.com/my-account/orders/"><i class="fa fa-handshake-o"></i>My Orders</a></li>
<li class="menu-item"><a href="https://website.com/my-account/customer-logout/"><i class="avatar"></i>Log out</a></li>
<?php
}
else {
?>
<li class="menu-item"><a class="porto-link-login" href="https://website.com/my-account/"><i class="fa fa-user"></i>Log In</a></li>
<?php
}
?>
You could also work with the current user capabilities current_user_can
to create a better filter for your menus.
I will give you the documentation below if you want to go further.
Documentation : https://developer.wordpress.org/reference/functions/is_user_logged_in/
https://codex.wordpress.org/Function_Reference/current_user_can