Skip to content

Commit

Permalink
Merge pull request #187 from synolia/feature/dissociate-old-taxons
Browse files Browse the repository at this point in the history
[FIX] Avoid eternal taxons on products
  • Loading branch information
TheGrimmChester authored Mar 25, 2024
2 parents 073f48a + c674597 commit c87a80d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Processor/Product/TaxonsProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __construct(

public function process(ProductInterface $product, array $resource): void
{
$product->getProductTaxons()->clear();
$taxonCodes = array_unique($resource['categories']);

foreach ($taxonCodes as $taxonCode) {
Expand Down

0 comments on commit c87a80d

Please sign in to comment.