• Resolved bartwiggers

    (@bartwiggers)


    Hi !

    We use the plugin Foosales POS for one of our customers, we see that the admin bar is also visible for visitors. I have now solved this by overriding the following function in the plugin:

    public function foosaleswc_hide_admin_bar() {
    		if ( is_page( 'foosales' ) ) {
    			return false;
    		} else {
    			return true;
    		}
    	}

    With the following:

    public function foosaleswc_hide_admin_bar() {
    		if ( is_page( 'foosales' ) ) {
    			return false;
    		} else {
    			if (is_user_logged_in()) {
    				return true;
    			}
    		}
    	}

    Can you add this, or similar code in a next release so that it won’t be overwritten in the next update from you?

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Thanks for bringing this to our attention. We’ve also catered for if you are logged in and have it set to not show the admin bar. We will add this code in the next version of the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Visitors Admin Bar | foosaleswc_hide_admin_bar’ is closed to new replies.