Created
November 25, 2014 12:37
-
-
Save lucasstark/1c77f8c724df61d5d2d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woocommerce_catalog_restrictions_get_roles_for_current_user', 'custom_woocommerce_catalog_restrictions_get_roles_for_current_user'); | |
function custom_woocommerce_catalog_restrictions_get_roles_for_current_user($roles){ | |
if ( current_user_can( 'wholesale_user')) { | |
unset($roles['guest']); | |
} | |
return $roles; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment