Skip to content

Commit

Permalink
Issue #3341340 by lukasz.tyc: (v 3.2) Error while saving "default" co…
Browse files Browse the repository at this point in the history
…mmerce product
  • Loading branch information
lukasz.tyc authored and js-droptica committed Jan 10, 2024
1 parent 09b0a4d commit f70b072
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ function _d_commerce_product_get_title(ProductInterface $product) {
$title = $product->getTitle();
}
else {
$title = $product->getDefaultVariation() ? $product->getDefaultVariation()->getTitle() : $product->getTitle();
$variation = $product->getDefaultVariation();
$title = $variation ? $variation->getTitle() : $product->getTitle();
}

return $title;
Expand Down

0 comments on commit f70b072

Please sign in to comment.