Skip to content

Commit

Permalink
Parse tax rate directly from custom property
Browse files Browse the repository at this point in the history
  • Loading branch information
Lasse Lehtinen committed Aug 13, 2024
1 parent 5196071 commit 0d967fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Groschen.php
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ public function getRelatedWorks()
*/
public function getTaxRate()
{
return floatval(preg_replace('/[^0-9]/', '', $this->product->taxCode->name));
return floatval($this->product->taxCode->customProperties->taxRatePercent);
}

/**
Expand Down

0 comments on commit 0d967fa

Please sign in to comment.