Advertisement
sparkweb

FoxyShop: Special Management

Dec 23rd, 2011
294
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Requires the special capability "order_management" to be able to access the Order, Customers, and Subscriptions
  3.  
  4. Instructions:
  5. 1. Place this code in your functions.php file
  6. 2. Install the Capabilities Manager plugin
  7. 3. Create a new role called "Order Manager"
  8. 4. Create a new capability of "order_management" and assign that role to the Admin and Order Manager roles
  9. 4a. Make sure the Order Manager has the "Read" capability also or they won't be able to login to the admin
  10. 5. Create your new user and assign them to the Order Manager role
  11. */
  12.  
  13. add_filter('foxyshop_order_perm', 'my_special_role');
  14. add_filter('foxyshop_customer_perm', 'my_special_role');
  15. add_filter('foxyshop_subscription_perm', 'my_special_role');
  16. function my_special_role() {
  17.     return 'order_management';
  18. }
Advertisement
RAW Paste Data Copied
Advertisement