Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #4027216
Compare button in the Main Menu
Open

Comments

  •  1
    Cristina started the conversation

    I have selected in the settings to hide the Compare option for unregister users. I have also selected to be shown in the menu. The problem is that it is visible for everybody in the menu. It does not work if you are not register, but it is shown and I want to hide it for unregister users. 

    Could you help me, please?


    Thank you

  •  1,468
    Dustin replied

    Hi Cristina,

    Please add the custom code below to hide the menu for unregistered users (guests). (How to add custom code? ↗):

    add_filter( 'woosc_menu_item', function ( $menu_item ) {
    	if ( ! is_user_logged_in() ) {
    		return '';
    	}
    
    	return $menu_item;
    } );

    Best regards,
    Dustin

  •  1
    Cristina replied

    Thank you so much!!!