Duplicate products

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 5 reply threads
  • Author
    Posts
    • #97023
      sdel_nevo
      Participant

      Hi Guys

      is it possible that when a vendor duplicates a product, the category is not copied (leaving the category empty)

      so that they have to assign this into the correct product category before its published.

      I have a lot of vendors duplicating products, changing the text ETC. and publishing into the incorrect category because they do not change it

      for example

      a vendor creates a product called, “40th Birthday card”

      adds an image and text
      publishes in “Birthday cards”

      then duplicates this, changes to product tile to “Get well soon”
      updates the images and text

      product is then published

      this card is also in birthday cards, it should have been changed to “get well soon”

      is that possible,

      Steve

    • #97233
      WCFM Forum
      Keymaster

      Hi,

      Please add this code to your site for the purpose-

      add_action( 'after_wcfm_product_duplicate', function( $new_product_id, $product ) {
      	wp_delete_object_term_relationships( $new_product_id, 'product_cat' );	
      }, 50, 2 );

      Thank You

    • #97256
      sdel_nevo
      Participant

      Hi Guys

      that’s great, works brilliantly

      many thanks

      Steve

    • #97307
      Craig
      Participant

      What file do we add that code to? Our functions.php ?

    • #97321
      sdel_nevo
      Participant

      Hi Craig

      Yes mate

      Put it in your functions.pho file

      Steve

    • #97325
      Craig
      Participant

      Awesome thanks Steve!

Viewing 5 reply threads
  • The topic ‘Duplicate products’ is closed to new replies.