0

I am trying to add WooCommerce product adding/editing capabilities to the Yoast SEO Manager role, however all it does is add the WooCommerce menu icon to that user role, and not the products tab, so that role cannot edit/create products.

Here is the code I came up with:

    if ( get_role('wpseo_manager') ) { // If Yoast role exists
        $role = get_role( 'wpseo_manager' );
        $role->add_cap( 'manage_woocommerce' ); // Add Woo Shop Manager Capabilities
    }
}

add_action( 'admin_init', 'seo_manager_woocommerce');

According to this doc, the manage_woocommerce capability is supposed to allow the usre to crete/modify products, but it is not working.

Any ideas?

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.