Skip to content

Commit

Permalink
Always save a copy of the model for logging.
Browse files Browse the repository at this point in the history
Fixes #35
  • Loading branch information
imagehat committed Jul 7, 2021
1 parent 7a1377d commit 21aa901
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/services/SalesTaxService.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,8 @@ private function getTotalTax($order, $transaction)
}
}

if($this->debug)
{
// workaround to save the model as array for debug logging
$m = $t; $model = $m->createAdjustmentRequest(null, null)['newTransaction'];
}
// workaround to save the model as array for debug logging
$m = $t; $model = $m->createAdjustmentRequest(null, null)['newTransaction'];

$signature = $this->getOrderSignature($order);
$cacheKey = 'avatax-'.$this->type.'-'.$signature;
Expand Down

0 comments on commit 21aa901

Please sign in to comment.