Have the taxonomies & product meta set after children are created when duplicating product. #644

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

KZeni commented Sep 5, 2013

Bug fix for the following issue: Only the first product variant would be shown on the public product listing on a product that had been duplicated (original containing multiple variants).

Turns out only the first term relationship was being kept during the duplication process (public page uses get_terms while admin uses custom query [which is why variants were still being shown there]… missing term relationships leads to missing variants called by get_terms).

Commenting out the wpsc_duplicate_children() function was a quick fix as it's 100% caused by that process, but that wasn't a good route to take. Settled on simply changing the order in which it happens… duplicate children first, and then taxonomies & product meta. That fixed the issue!

@KZeni KZeni Have the taxonomies & product meta set after children are created whe…
…n duplicating product.

**Bug fix for the following issue:** Only the first product variant would be shown on the public product listing on a product that had been duplicated (original containing multiple variants). Turns out only the first term relationship was being kept during the duplication process (public page uses get_terms while admin uses custom query [which is why variants were still being shown there]… missing term relationships leads to missing variants called by get_terms).

Commenting out the wpsc_duplicate_children() function was a quick fix as it's 100% caused by that process, but that wasn't a good route to take. Settled on simply changing the order in which it happens… duplicate children first, and then taxonomies & product meta. *That fixed the issue!*
0ca1145
Collaborator

garyc40 commented Oct 1, 2013

Couldn't replicate this issue. I could duplicate a product with variations just fine, with all the variation options showing in:

  • wp-admin product edit page
  • on the front-end, products page, single product view, category view

Is there any step after product duplication that I'm missing? Do you have screenshots?

Owner

JustinSainton commented Dec 21, 2013

Closing pending reporter feedback. Haven't heard back from them in 3 months, haven't heard anyone else report the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment