Skip to content

Commit

Permalink
ensure element gets propagated when importing for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Oct 15, 2024
1 parent 83378a2 commit 2544dd7
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 @@ -243,6 +243,7 @@ public function save($element, $settings): bool
if ($this->element->getIsDraft()) {
$this->element->setDirtyAttributes(['variants']);
$this->element = Craft::$app->getDrafts()->applyDraft($this->element);
$this->element->propagateAll = true;
}

if (!Craft::$app->getElements()->saveElement($this->element, true, true, Hash::get($this->feed, 'updateSearchIndexes'))) {
Expand Down

0 comments on commit 2544dd7

Please sign in to comment.