Skip to content

Instantly share code, notes, and snippets.

@mohammadmursaleen
Created September 6, 2016 05:55
Show Gist options
  • Save mohammadmursaleen/979fad83e4872f481a382884af3c6af6 to your computer and use it in GitHub Desktop.
Save mohammadmursaleen/979fad83e4872f481a382884af3c6af6 to your computer and use it in GitHub Desktop.
Function to allow users to manage their profiles from back-end in WooCommerce
<?php
/**
* @author Mohammad Mursaleen
* @usage Allow other user roles to access admin area to manage their profiles from dashboard - WooCommerce Quick fix
*/
add_filter( 'woocommerce_prevent_admin_access', 'objects_woocommerce_login_redirect_fix' , 20 , 1 );
function objects_woocommerce_login_redirect_fix($prevent_access){
$prevent_access = false;
return $prevent_access;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment