From 0d967faf77e86e6b47439cde093be517b0a7b675 Mon Sep 17 00:00:00 2001 From: Lasse Lehtinen Date: Tue, 13 Aug 2024 13:54:40 +0300 Subject: [PATCH] Parse tax rate directly from custom property --- src/Groschen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groschen.php b/src/Groschen.php index 346f789..3bc438f 100644 --- a/src/Groschen.php +++ b/src/Groschen.php @@ -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); } /**