added conditional to listener

This commit is contained in:
spencerrlongg 2024-08-07 16:53:06 -05:00
parent 766b370264
commit 2412333152

View file

@ -137,6 +137,10 @@ class CheckoutableListener
*/
private function getCheckoutAcceptance($event)
{
$checkedOutToType = get_class($event->checkedOutTo);
if ($checkedOutToType != "App\Models\User") {
return null;
}
if (!$event->checkoutable->requireAcceptance()) {
return null;
}