Skip to content

Commit

Permalink
Merge pull request #108 from benjicarson/patch-1
Browse files Browse the repository at this point in the history
impr: Favour hasMethod over method_exists
  • Loading branch information
wilr committed Oct 7, 2021
2 parents 78fd687 + a07f7c9 commit f761eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ItemPriceInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(OrderItem $item)
$this->item = $item;
$this->quantity = $item->Quantity;

$originalprice = method_exists($item, 'DiscountableAmount') ?
$originalprice = $item->hasMethod('DiscountableAmount') ?
$item->DiscountableAmount() :
$item->UnitPrice();

Expand Down

0 comments on commit f761eec

Please sign in to comment.