From be589e79bd78a0a88ab5edd976fadb653a80a08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Wed, 28 Apr 2021 13:43:41 +0200 Subject: [PATCH] Add action for hook woocommerce_created_customer [MAILPOET-3483] --- lib/Config/Hooks.php | 5 +++++ lib/Segments/WooCommerce.php | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/Config/Hooks.php b/lib/Config/Hooks.php index f7cfc005e9..1160a99f1b 100644 --- a/lib/Config/Hooks.php +++ b/lib/Config/Hooks.php @@ -273,6 +273,11 @@ class Hooks { public function setupWooCommerceUsers() { // WooCommerce Customers synchronization + $this->wp->addAction( + 'woocommerce_created_customer', + [$this->hooksWooCommerce, 'synchronizeRegisteredCustomer'], + 7 + ); $this->wp->addAction( 'woocommerce_new_customer', [$this->hooksWooCommerce, 'synchronizeRegisteredCustomer'], diff --git a/lib/Segments/WooCommerce.php b/lib/Segments/WooCommerce.php index 61a873bdab..fd6387addb 100644 --- a/lib/Segments/WooCommerce.php +++ b/lib/Segments/WooCommerce.php @@ -72,6 +72,7 @@ class WooCommerce { $this->unsubscribeUsersFromSegment(); // remove leftover association break; case 'woocommerce_new_customer': + case 'woocommerce_created_customer': $newCustomer = true; case 'woocommerce_update_customer': default: