daily pastebin goal

FoxyShop: Special Management

sparkweb Dec 23rd, 2011 141 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
  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. */
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand