WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
where is the option to "unhide" the admin bar for subscribers? (3 posts)

  1. ds123
    Member
    Posted 5 months ago #

    i've had to hack some woocommerce function to unhide the admin bar for subscribers ....problem is every upgrade i have to remember to re-do it .....it took me forever to figure out it was this plugin causing this to happen .... how can i fix it so upgrades don't overwrite ?

    thanks!

    https://wordpress.org/plugins/woocommerce/

  2. popgirl23
    Member
    Posted 4 months ago #

    what is your hack?

  3. ds123
    Member
    Posted 4 months ago #

    what i did is in /wp-content/plugins/woocommerce/includes/wc-customer-functions.php comment out lines 26-33

    /**
    
    function wc_disable_admin_bar( $show_admin_bar ) {
    	if ( apply_filters( 'woocommerce_disable_admin_bar', get_option( 'woocommerce_lock_down_admin', 'yes' ) === 'yes' ) && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) ) {
    		$show_admin_bar = false;
    	}
    
    	return $show_admin_bar;
    }
    add_filter( 'show_admin_bar', 'wc_disable_admin_bar', 10, 1 );
     */

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.