Advertisement
mbcreation

Give access to store manager

Mar 7th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. //Note : this example if for store manager, butyou can change 'manage_woocommerce' by any other WooCommerce / Wordpress role. Please refer here: https://codex.wordpress.org/Roles_and_Capabilities
  2.  
  3. // PHP >= 5.3
  4. add_filter( 'wqep_caps', function( $cap ) { return 'manage_woocommerce'; } );
  5.  
  6. // PHP < 5.3
  7. add_filter( 'wqep_caps', 'add_export_to_manager');
  8.  
  9. function add_export_to_manager($cap){
  10.  
  11. return 'manage_woocommerce';
  12.  
  13. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement