From 3f141f0fca488bb9ca1804627d746807028b226e Mon Sep 17 00:00:00 2001 From: Thomas Geiger Date: Mon, 5 Feb 2024 14:57:53 +0100 Subject: [PATCH] Fix wrong order fields used while data cleaning --- integration/woocommerce.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/woocommerce.php b/integration/woocommerce.php index 0b9efcfa..e9e13805 100755 --- a/integration/woocommerce.php +++ b/integration/woocommerce.php @@ -224,19 +224,19 @@ function gtm4wp_woocommerce_get_raw_order_datalayer( $order, $order_items ) { $billing_email_hash = hash( 'sha256', $billing_email ); } - $billing_first = trim( $order->get_billing_email() ); + $billing_first = trim( $order->get_billing_first_name() ); $billing_first_hash = ''; if ( '' !== $billing_first ) { $billing_first_hash = hash( 'sha256', $billing_first ); } - $billing_last = trim( $order->get_billing_email() ); + $billing_last = trim( $order->get_billing_last_name() ); $billing_last_hash = ''; if ( '' !== $billing_last ) { $billing_last_hash = hash( 'sha256', $billing_last ); } - $billing_phone = trim( $order->get_billing_email() ); + $billing_phone = trim( $order->get_billing_phone() ); $billing_phone_hash = ''; if ( '' !== $billing_phone ) { $billing_phone_hash = hash( 'sha256', $billing_phone );