Skip to content

Commit

Permalink
Fix wrong order fields used while data cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
duracelltomi committed Feb 5, 2024
1 parent 4aad785 commit 3f141f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integration/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 3f141f0

Please sign in to comment.