'Add custom User role for woocommerce to Only Edit ORDERS

I wrote this code to create a custom user called "payment manager", this user should only edit/ view woo-commerce orders, Im have looked everywhere and didn't found any answer, see code:

function sitelab_simple_role() {
        add_role(
            'payment-manager',
            'Payment Manager',
            array(
                'read'         => true,
                'edit_posts'   => true,
                'upload_files' => false,
                ‘manage_woocommerce’    => false,
                'manage_woocommerce_orders' => true,
                'edit_shop_order' => true,
                'edit_shop_order_terms' => true,
                'edit_shop_orders' => true,
                'manage_shop_order_terms' => true,
                'publish_shop_orders' => true,
                'read_private_shop_orders' => true,
                'read_shop_order' => true,
            ),
        );
    }
    
add_action( 'init', 'sitelab_simple_role' );

For some-reason it doesn't allow to edit order with error message "you are not authorized for this action"

What could it be?

Thanks for the helpers



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source