Change WordPress user roles and capabilities Forums How to or FAQ Duplicate product – shop manager

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7529
    centroil
    Participant

    Hi,
    I have created a shop manager role but now I notice that he lose the capability to duplicate products. I do not find that capability in the list.
    What should I do to make the shop manager able to duplicate a product?

    Thanks for support.
    Have a nice day

    Michele

    #7532
    Vladimir
    Keymaster

    Hi Michele,

    WooCommerce by default uses ‘manage_woocommerce’ capability for ‘Duplicate’ link under products. It’s possible to replace it with something other using provide custom filter ‘woocommerce_duplicate_product_capability’, like this:

    
    add_filter('woocommerce_duplicate_product_capability', 'wc_duplicate_product_cap', 10, 1);
    function wc_duplicate_product_cap( $cap ) {
      $cap = 'edit_products';
      return $cap;
    }
    
    #7543
    centroil
    Participant

    Thanks so much Vladimir, really!
    Michele

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.