Skip to content

Commit

Permalink
Update PurchaseEvent.php
Browse files Browse the repository at this point in the history
Fix for error in checkout
  • Loading branch information
Webwijs authored Oct 4, 2024
1 parent cb5165d commit b0028bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Observer/PurchaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ public function execute(Observer $observer)

private function getUserData(): array
{

$userData = $this->userDataHelper->getUserData();

$order = $this->checkoutSession->getLastRealOrder();

$billingAddress = $order->getBillingAddress();

$shippingAddress = $order->getShippingAddress();
$billingAddress = $shippingAddress;

$userData['email'] = $billingAddress->getEmail();
$userData['email_hashed'] = hash('sha256', $billingAddress->getEmail());
Expand Down

0 comments on commit b0028bf

Please sign in to comment.