WordPress.org

Forums

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

  1. ds123
    Member
    Posted 1 year 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 1 year ago #

    what is your hack?

  3. ds123
    Member
    Posted 1 year 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 );
     */

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.