Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    Did you try the “Reset capabilities” tool offered by WooCommerce?
    What capability you can not find?

    This is how WooCommerce builds a full list of its capabilities:

    private static function get_core_capabilities() {
    		$capabilities = array();
    
    		$capabilities['core'] = array(
    			'manage_woocommerce',
    			'view_woocommerce_reports'
    		);
    
    		$capability_types = array( 'product', 'shop_order', 'shop_coupon', 'shop_webhook' );
    
    		foreach ( $capability_types as $capability_type ) {
    
    			$capabilities[ $capability_type ] = array(
    				// Post type
    				"edit_{$capability_type}",
    				"read_{$capability_type}",
    				"delete_{$capability_type}",
    				"edit_{$capability_type}s",
    				"edit_others_{$capability_type}s",
    				"publish_{$capability_type}s",
    				"read_private_{$capability_type}s",
    				"delete_{$capability_type}s",
    				"delete_private_{$capability_type}s",
    				"delete_published_{$capability_type}s",
    				"delete_others_{$capability_type}s",
    				"edit_private_{$capability_type}s",
    				"edit_published_{$capability_type}s",
    
    				// Terms
    				"manage_{$capability_type}_terms",
    				"edit_{$capability_type}_terms",
    				"delete_{$capability_type}_terms",
    				"assign_{$capability_type}_terms"
    			);
    		}
    
    		return $capabilities;
    	}

    So there is no ‘manage_shop_orders’ capability. Only ‘edit_shop_orders’ exists.

    Thread Starter Darryl.R

    (@darrylr)

    Hi Vladimir

    Thanks for the reply;

    Yes I did use the reset capabilities tool.

    The capability is the manage_woocommerce_orders capability – Upon further investigation, I think its activated/added by the “WooCommerce Print Invoice & Delivery Note” plugin.

    I’ve added this plugin to my site as well, but no luck. Any idea why this capability is not coming up? I will follow up with the other plugin developer as well.

    Thank you!

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Yes, ‘manage_woocommerce_orders’ capability is not supported by WooCommerce.

    I scanned WCDN plugin code. It does not use ‘manage_woocommerce_orders’ capability. It checks ‘edit_shop_orders’ one. So ‘manage_woocommerce_orders’ may be needed for some other plugin.

    Some plugin developers expect that custom capability for their plugins will be added manually via tools, like User Role Editor.

    Thread Starter Darryl.R

    (@darrylr)

    Thanks Vladimir

    I will try to find out if there is another plugin adding this custom capability.

    Thread Starter Darryl.R

    (@darrylr)

    I’ve duplicated all the plugins used on the other websites, still nothing.

    Can perhaps I add the capability via the functions.php of my child theme?

    Plugin Author Vladimir Garagulya

    (@shinephp)

    May be you need to start from other side.
    For what purpose do you need this capability? What functionality do you can not access without it?

    Thread Starter Darryl.R

    (@darrylr)

    Hi Vladimir

    I need to separate access to the order management from Woocommerce settings.

    I’ve created a role which allows access to 2 areas – user management and order management.

    But I don’t want to give access to the shopping cart and other settings in WordPress.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Manage Woocommerce Orders Capability not visible’ is closed to new replies.