Skip to content

Commit 8c6504f

Browse files
authored
Merge pull request #261 from meminuygur/patch-1
fix "Undefined array key payment_method_selected" error in ComponentManager
2 parents a84bf22 + 1e5de3a commit 8c6504f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MageWire/Checkout.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ public function __construct(
2323
$this->addPaymentInfo = $addPaymentInfo;
2424
}
2525

26-
public function booted(): void
26+
public function boot(): void
2727
{
2828
// @phpstan-ignore-next-line
29-
parent::booted();
29+
parent::boot();
3030

3131
// @todo: Do this only with the Hyva Checkout
3232
// @phpstan-ignore-next-line
3333
$this->listeners['shipping_method_selected'] = 'triggerShippingMethod';
34-
$this->listeners['payment_method_selected'] = 'triggerShippingMethod';
34+
$this->listeners['payment_method_selected'] = 'triggerPaymentMethod';
3535

3636
// @todo: Do this only with the Loki Checkout
3737
$this->listeners['afterSaveShippingMethod'] = 'triggerShippingMethod';
38-
$this->listeners['afterSavePaymentMethod'] = 'triggerShippingMethod';
38+
$this->listeners['afterSavePaymentMethod'] = 'triggerPaymentMethod';
3939
}
4040

4141
public function triggerShippingMethod()

0 commit comments

Comments
 (0)