diff --git a/src/CanBeBought.php b/src/CanBeBought.php index eb9810f..888b0aa 100644 --- a/src/CanBeBought.php +++ b/src/CanBeBought.php @@ -54,4 +54,16 @@ trait CanBeBought return 0; } + + /** + * Get the taxRate of the Buyable item. + */ + public function getBuyableTaxRate($options = null): float + { + if (($taxRate = $this->getAttribute('taxRate'))) { + return $taxRate; + } + + return config('cart.tax', 0.21); + } }