Have you tried
if ( $args->theme_location == 'primary-menu' && $args->theme_location == 'footer-menu' )
Or
if ( $args->theme_location == 'primary-menu' || $args->theme_location == 'footer-menu' )
?
Also check this answer:
https://wordpress.org/support/topic/add-a-log-out-button-to-the-menu?replies=6#post-7139735
Thank you so much Samuel!
if ( $args->theme_location == ‘primary-menu’ || $args->theme_location == ‘footer-menu’ )
worked!!!
No worries, you are welcome!
Have a nice day!