Answers.Body: <p>We found this to be problematic as well.</p>
  <p>You can restore the default Woo admin bar and admin access with code:</p>
  <pre><code>add_filter('woocommerce_disable_admin_bar', 'cv_wc_disable_admin_bar', 10, 1);
  
  function cv_wc_disable_admin_bar($prevent_admin_access) {
  
      return false;
  }
  
  add_filter('woocommerce_prevent_admin_access', 'cv_wc_prevent_admin_access', 10, 1);
  
  function cv_wc_prevent_admin_access($prevent_admin_access) {
  
      return false;
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-04T21:42:10.907Z
Answers.Text: @kevin_cristiano Excellent! The woocommerce_prevent_admin_access solved the issue!!! However, I do not see what the woocommerce_disable_admin_bar filter does though.
Answers.UserDisplayName: jsherk
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-04T22:39:12.067Z
Answers.Text: Woo can also hide the admin bar for non administrators, or at least it did at one time :) things change and that may not be an issue any longer
Answers.UserDisplayName: Kevin Cristiano
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-04T21:07:15.940Z
Answers.LastActivityDate: 2022-05-04T21:07:15.940Z
Answers.UserDisplayName: Kevin Cristiano
Body: <p>I have CiviCRM installed on WordPress.</p>
  <p>I have duplicated the wordpress Subscriber role (using Members plugin), and then I go to Administer &gt; User and Permissions &gt; Permissions (Access Control) &gt; Wordpress Access Control and I assign ALL permissions to this new role.</p>
  <p>I then assign this role to a user, and login with the user.</p>
  <p>If I have the WooCommerce plugin activated, the user can not access the CiviCRM menus at <a href="https://mysite.com/wp-admin/admin.php?page=CiviCRM" rel="nofollow noreferrer">https://mysite.com/wp-admin/admin.php?page=CiviCRM</a> ... it gets redirected to the WooCommerce my-account page.</p>
  <p>As soon as I disable the WooCommerce plugin, the user now has full access to the CiviCRM menus.</p>
  <p>Any thoughts or ideas on how to get around this situation?</p>
  <p>Thanks</p>
  
Tags: <wordpress><civicrm-home><evaluating-civicrm><woocommerce>
Title: WooCommerce prevents user from accessing CiviCRM menus
ThreadText: # WooCommerce prevents user from accessing CiviCRM menus
  
  (Asked by: username_0 on 2022-05-04)
  
  I have CiviCRM installed on WordPress.
  
  I have duplicated the wordpress Subscriber role (using Members plugin), and then I go to Administer > User and Permissions > Permissions (Access Control) > Wordpress Access Control and I assign ALL permissions to this new role.
  
  I then assign this role to a user, and login with the user.
  
  If I have the WooCommerce plugin activated, the user can not access the CiviCRM menus at <https://mysite.com/wp-admin/admin.php?page=CiviCRM> ... it gets redirected to the WooCommerce my-account page.
  
  As soon as I disable the WooCommerce plugin, the user now has full access to the CiviCRM menus.
  
  Any thoughts or ideas on how to get around this situation?
  
  Thanks
  
  **Tags:** wordpress, civicrm-home, evaluating-civicrm, woocommerce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-05-04. Score: 1 | Accepted answer
  
  We found this to be problematic as well.
  
  You can restore the default Woo admin bar and admin access with code:
  
  ```
  add_filter('woocommerce_disable_admin_bar', 'cv_wc_disable_admin_bar', 10, 1);
  
  function cv_wc_disable_admin_bar($prevent_admin_access) {
  
      return false;
  }
  
  add_filter('woocommerce_prevent_admin_access', 'cv_wc_prevent_admin_access', 10, 1);
  
  function cv_wc_prevent_admin_access($prevent_admin_access) {
  
      return false;
  }
  
  ```
  
  > **Comments:**
  > **username_0**: @username_1 Excellent! The woocommerce_prevent_admin_access solved the issue!!! However, I do not see what the woocommerce_disable_admin_bar filter does though.  
  > **username_1**: Woo can also hide the admin bar for non administrators, or at least it did at one time :) things change and that may not be an issue any longer  
  
  ---
  
  