Update CanBeBought.php

This commit is contained in:
Patrick
2022-02-06 19:53:14 +01:00
committed by GitHub
parent 5d55788584
commit 66ce04a150

View File

@@ -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);
}
}