Skip to content

Commit

Permalink
Fix exception when updating order line
Browse files Browse the repository at this point in the history
  • Loading branch information
lguichard committed Oct 2, 2024
1 parent 26d70d7 commit 03e895c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Observers/OrderLineObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function creating(OrderLine $orderLine)
*/
public function updating(OrderLine $orderLine)
{
if (! in_array(Purchasable::class, class_implements($orderLine->purchasable_type, true))) {
if (! in_array(Purchasable::class, class_implements(Relation::getMorphedModel($orderLine->purchasable_type), true))) {
throw new NonPurchasableItemException($orderLine->purchasable_type);
}
}
Expand Down

0 comments on commit 03e895c

Please sign in to comment.