Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Woocommerce restrict to view of orders › Reply To: Woocommerce restrict to view of orders
Orders menu is protected by ‘edit_shop_orders’ capability. It’s possible to prohibit new order creation if you activate ‘create’ capability at User Role Editor Settings.
But ‘edit_shop_orders’ capability is enough to ‘process’ and ‘complete’ the order. The only way to allow a read-only access to the WooCommerce orders is to use this filter from WooCommerce code:
$actions = apply_filters( 'woocommerce_admin_order_actions', $actions, $the_order );
Your function for this filter should return empty $actions array for ‘editor’ role in order to make for them read-only access.
Let me know if you need further help.