Skip to content

Commit

Permalink
Fixed Tax Class mapping after Akeneo update (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
pimruiter authored Aug 29, 2022
1 parent 944c8d6 commit f472571
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions Plugin/SetTaxClassId.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,6 @@ public function afterAddRequiredData(Product $context)
}
}

/**
* After tax_class_id has been set to normal option value
* set it to correct value.
*
* @param Product $context
* @return void
*/
public function afterUpdateOption(Product $context)
{
if (!$this->tax_id_columns) {
return;
}

/** @var AdapterInterface $connection */
$connection = $this->entitiesHelper->getConnection();
/** @var string $tmpTable */
$tmpTable = $this->entitiesHelper->getTableName($context->getCode());

$taxColumns = $this->checkTaxColumnsExist($this->tax_id_columns, $tmpTable);

foreach ($taxColumns as $taxColumn) {
$connection->query('UPDATE ' . $tmpTable . ' SET `' . $taxColumn . '` = `_tax_class_id`;');
}
}

/**
* Create the query to update the rows.
*
Expand Down

0 comments on commit f472571

Please sign in to comment.