Skip to content

Commit

Permalink
Readable code
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Oct 17, 2023
1 parent 9fb7cc2 commit fa703b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jobs/UpdateProductVariants.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public function execute($queue): void
$api = Plugin::getInstance()->getApi();

/** @var Product|null $product */
if ($product = Product::find()->shopifyId($this->shopifyProductId)->one()) {
$product = Product::find()->shopifyId($this->shopifyProductId)->one();

if ($product) {
$variants = $api->getVariantsByProductId($this->shopifyProductId);
$product->setVariants($variants);
/** @var ProductDataRecord $productData */
Expand Down

0 comments on commit fa703b6

Please sign in to comment.