Fixes for null or missing tax_id props

This commit is contained in:
David Bomba 2023-10-15 17:16:27 +11:00
parent 9913d4c0b2
commit 1403345989
2 changed files with 2 additions and 2 deletions

View File

@ -297,7 +297,7 @@ class BaseRule implements RuleInterface
public function tax($item = null): self public function tax($item = null): self
{ {
if ($this->client->is_tax_exempt) { if ($this->client->is_tax_exempt || !property_exists($item, 'tax_id')) {
return $this->taxExempt($item); return $this->taxExempt($item);

View File

@ -63,7 +63,7 @@ class Rule extends BaseRule implements RuleInterface
public function taxByType($item): self public function taxByType($item): self
{ {
if ($this->client->is_tax_exempt) { if ($this->client->is_tax_exempt || !property_exists($item, 'tax_id')) {
return $this->taxExempt($item); return $this->taxExempt($item);
} }