Skip to content

Commit

Permalink
when variant is new, set the product on it (that'll set ownership)
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Oct 9, 2024
1 parent 34f2eda commit dd152fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/elements/CommerceProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ private function _parseVariants($event): void
// Create a new variant, or find an existing one to edit
if (!isset($variants[$sku])) {
$variants[$sku] = new VariantElement();
$variants[$sku]->product = $element;
}

// We are going to handle stock after the product and variants save
Expand Down

0 comments on commit dd152fc

Please sign in to comment.