• Resolved imanpak

    (@imanpak)


    Hi Guys,

    I’m just having a problem with shippig. I want to create a custom role to limit users to manage orders

    some note:
    order manager must see only Order Menu in the dashboard
    order manager can create, edit and delete orders and coupon

    I have provided modified code for this but when the user with new role login to the admin panel get this error “Sorry, You Are Not Allowed to Access This Page”

    my code to create new role

    add_role(
        'order_manager', //  System name of the role.
        __( 'Order Manager'  ), // Display name of the role.
        array(
          'view_admin_dashboard' => true,
          'assign_shop_order_terms' => true, 
          'assign_shop_webhook_terms' =>true, 
          'delete_others_shop_coupons' => true, 
          'delete_others_shop_orders' => true,
          'view_woocommerce_reports' => true,
          'edit_shop_order' => true,
          'read_shop_order' => true,
          'delete_shop_order' => true,
          'edit_shop_orders' => true,
          'edit_others_shop_orders' => true,
          'publish_shop_orders' => true,
          'read_private_shop_orders' => true,
          'delete_shop_orders' => true,
          'delete_private_shop_orders' => true,
          'delete_published_shop_orders' => true,
          'edit_private_shop_orders' => true,
          'edit_published_shop_orders' => true,
          'manage_shop_order_terms' => true,
          'edit_shop_order_terms' => true,
          'delete_shop_order_terms' => true,
          'edit_shop_coupon' => true,
          'read_shop_coupon' => true,
          'delete_shop_coupon' => true,
          'edit_shop_coupons' => true,
          'edit_others_shop_coupons' => true,
          'publish_shop_coupons' => true,
          'read_private_shop_coupons' => true,
          'delete_shop_coupons' => true,
          'delete_private_shop_coupons' => true,
          'delete_published_shop_coupons' => true,
          'delete_others_shop_coupons' => true,
          'edit_private_shop_coupons' => true,
          'edit_published_shop_coupons' => true,
          'manage_shop_coupon_terms' => true,
          'edit_shop_coupon_terms' => true,
          'delete_shop_coupon_terms' => true,
          'assign_shop_coupon_terms' => true,
          'edit_shop_webhook' => true,
          'read_shop_webhook' => true,
          'delete_shop_webhook' => true,
          'edit_shop_webhooks' => true,
          'edit_others_shop_webhooks' => true,
          'publish_shop_webhooks' => true,
          'read_private_shop_webhooks' => true,
          'delete_shop_webhooks' => true,
          'delete_private_shop_webhooks' => true,
          'delete_published_shop_webhooks' => true,
          'delete_others_shop_webhooks' => true,
          'edit_private_shop_webhooks' => true,
          'edit_published_shop_webhooks' => true,
          'manage_shop_webhook_terms' => true,
          'edit_shop_webhook_terms' => true,
          'delete_shop_webhook_terms'=> true,
        )
    );

    Can anyone help me on how to solve this ?
    Thanks.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘create order manager role’ is closed to new replies.