Skip to content

Commit 4903a63

Browse files
authored
Merge pull request #73 from WebDevStudios/spotfix/update-post-arg-check
Fix: update POST arg to ensure customer data updated properly
2 parents 59acc57 + c19f953 commit 4903a63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AbandonedCarts/CartHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function update_cart_data() {
8484
$customer_data['shipping'] = array_merge( $customer_data['shipping'], WC()->customer->get_shipping() );
8585

8686
// Check if submission attempted.
87-
if ( isset( $_POST['woocommerce_checkout_place_order'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification -- Okay use of $_POST data.
87+
if ( isset( $_POST['billing_email'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification -- Okay use of $_POST data.
8888
// Update customer data from posted data.
8989
array_walk( $customer_data['billing'], [ $this, 'process_customer_data' ], 'billing' );
9090
array_walk( $customer_data['shipping'], [ $this, 'process_customer_data' ], 'shipping' );

0 commit comments

Comments
 (0)