After today’s theme update, the ’email’ field is missing from the order summary.

This topic has 10 replies, 3 voices, and was last updated 1 week, 3 days ago ago by Tony Rodriguez

  • Avatar: hafunerix
    hafunerix
    Participant
    July 15, 2026 at 12:28

    I have just noticed that new orders appearing in my store do not have the customer’s email address, even though it is a required field during checkout. Today, I updated the Xstore Theme, Xstore Core, and the WooCommerce plugin.

    Changing the checkout layout from Multistep to Classic does not change anything. I also checked these transactions with the payment processor, and email addresses were not assigned to those orders there either. As a result, I have no contact with the customers, and they are not receiving any transactional emails from the store.

    Please assist with this matter.

    Files is visible for topic creator and
    support staff only.
    9 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 15, 2026 at 13:56

    Hello, hafunerix,

    We appreciate you bringing this issue to our attention. We understand how important it is to have customer email addresses correctly recorded for order processing and communication.

    To assist you further, please provide us with temporary admin access to your WordPress Dashboard (via a secure private message) so that we can check the configuration and identify the cause of the issue. Additionally, please confirm whether any custom checkout plugins or modifications have been made recently.

    Once we have this information, we will investigate the problem and provide you with a suitable solution as soon as possible.

    Best Regards,
    8Theme’s Team

    Avatar: hafunerix
    hafunerix
    Participant
    July 15, 2026 at 14:32

    Thank you for your reply. Credentials in the private area.

    Content is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 15, 2026 at 15:05

    Thank you for the access. Please add the following code to your child theme functions.php file, or provide us with FTP access and we’ll do it for you.

    add_action(
    	'woocommerce_after_checkout_validation',
    	function ( $data, $errors ) {
    
    		$email = isset( $data['billing_email'] )
    			? sanitize_email( $data['billing_email'] )
    			: '';
    
    		if ( empty( $email ) ) {
    			$errors->add(
    				'billing_email_missing',
    				__( 'Please enter your email address before placing the order.', 'your-child-theme' )
    			);
    
    			error_log(
    				'Checkout blocked: billing_email is missing. Payment method: ' .
    				( isset( $data['payment_method'] )
    					? sanitize_text_field( $data['payment_method'] )
    					: 'unknown'
    				)
    			);
    
    			return;
    		}
    
    		if ( ! is_email( $email ) ) {
    			$errors->add(
    				'billing_email_invalid',
    				__( 'Please enter a valid email address.', 'your-child-theme' )
    			);
    		}
    	},
    	999,
    	2
    );
    
    add_action(
    	'woocommerce_checkout_create_order',
    	function ( $order, $data ) {
    
    		if ( ! $order instanceof WC_Order ) {
    			return;
    		}
    
    		$current_email = sanitize_email( $order->get_billing_email() );
    
    		if ( ! empty( $current_email ) ) {
    			return;
    		}
    
    		$submitted_email = isset( $data['billing_email'] )
    			? sanitize_email( $data['billing_email'] )
    			: '';
    
    		if ( empty( $submitted_email ) && isset( $_POST['billing_email'] ) ) {
    			$submitted_email = sanitize_email(
    				wp_unslash( $_POST['billing_email'] )
    			);
    		}
    
    		if ( is_email( $submitted_email ) ) {
    			$order->set_billing_email( $submitted_email );
    
    			error_log(
    				'Checkout safeguard: billing email restored for order creation: ' .
    				$submitted_email
    			);
    		}
    	},
    	999,
    	2
    );

    Best Regards,
    8Theme’s Team

    Avatar: hafunerix
    hafunerix
    Participant
    July 15, 2026 at 15:26

    I have added the code to the functions.php file in the child theme (as shown in the attached screenshot), but unfortunately, it didn’t change anything.

    Files is visible for topic creator and
    support staff only.
    Avatar: hafunerix
    hafunerix
    Participant
    July 15, 2026 at 16:03

    It’s a strange issue. For the last customer, the email address was correctly included in the order summary (as shown in the attachment). But when I subsequently placed a test order, the email address I entered didn’t show up in the order details again.

    However, from what I can see, that customer placed the order using an account in my store (or created one during checkout). The other orders (including my test orders) were placed as a guest, and that’s when the email address disappears.

    Files is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    July 16, 2026 at 06:55

    Hello, hafunerix,

    Thank you for your message. This information confirms that the issue is most likely related specifically to the guest checkout process.

    For registered customers, WooCommerce retrieves the email address from the customer account. Guest orders, however, rely entirely on the billing_email value submitted during checkout. In this case, the email field is displayed and filled in, but its value appears to be removed or not saved during the guest checkout process.

    As a temporary measure, please add the following code to the functions.php file of the XStore child theme:

    /**
     * Force the billing email field to be required.
     */
    add_filter(
    	'woocommerce_checkout_fields',
    	function ( $fields ) {
    
    		if ( isset( $fields['billing']['billing_email'] ) ) {
    			$fields['billing']['billing_email']['required'] = true;
    			$fields['billing']['billing_email']['type']     = 'email';
    		}
    
    		return $fields;
    	},
    	9999
    );
    
    /**
     * Validate the email before WooCommerce creates the order.
     */
    add_action(
    	'woocommerce_after_checkout_validation',
    	function ( $data, $errors ) {
    
    		$email = '';
    
    		if ( ! empty( $data['billing_email'] ) ) {
    			$email = sanitize_email( $data['billing_email'] );
    		} elseif ( ! empty( $_POST['billing_email'] ) ) {
    			$email = sanitize_email(
    				wp_unslash( $_POST['billing_email'] )
    			);
    		}
    
    		/*
    		 * Registered customers may have an email in their account,
    		 * but guest checkout must always submit billing_email.
    		 */
    		if ( ! is_user_logged_in() && empty( $email ) ) {
    			$errors->add(
    				'guest_billing_email_missing',
    				__(
    					'Please enter your email address before placing the order.',
    					'xstore-child'
    				)
    			);
    
    			wc_get_logger()->warning(
    				'Guest checkout was blocked because billing_email was missing.',
    				array(
    					'source'         => 'guest-checkout-email',
    					'payment_method' => ! empty( $data['payment_method'] )
    						? sanitize_text_field( $data['payment_method'] )
    						: 'unknown',
    				)
    			);
    
    			return;
    		}
    
    		if ( ! empty( $email ) && ! is_email( $email ) ) {
    			$errors->add(
    				'guest_billing_email_invalid',
    				__(
    					'Please enter a valid email address.',
    					'xstore-child'
    				)
    			);
    		}
    	},
    	9999,
    	2
    );
    
    /**
     * Restore the submitted email before the order is saved.
     */
    add_action(
    	'woocommerce_checkout_create_order',
    	function ( $order, $data ) {
    
    		if ( ! $order instanceof WC_Order ) {
    			return;
    		}
    
    		if ( $order->get_billing_email() ) {
    			return;
    		}
    
    		$email = '';
    
    		if ( ! empty( $data['billing_email'] ) ) {
    			$email = sanitize_email( $data['billing_email'] );
    		} elseif ( ! empty( $_POST['billing_email'] ) ) {
    			$email = sanitize_email(
    				wp_unslash( $_POST['billing_email'] )
    			);
    		}
    
    		if ( is_email( $email ) ) {
    			$order->set_billing_email( $email );
    
    			wc_get_logger()->notice(
    				'The missing billing email was restored during order creation.',
    				array(
    					'source' => 'guest-checkout-email',
    				)
    			);
    		}
    	},
    	9999,
    	2
    );

    After adding the code, please clear all website, server, CDN, and browser caches, and then place another test order as a guest.

    This code will prevent a guest order from being created if WooCommerce does not receive an email address. It will also restore the address if it was submitted correctly but removed from the order object before saving.

    Best regards,
    8Theme Team

    Avatar: hafunerix
    hafunerix
    Participant
    July 16, 2026 at 09:29

    After a two-hour session with Gemini, we finally found the culprit. The issue was caused by the Anti-Spam by CleanTalk plugin. A patched version of their plugin had already been available on their forum for a few hours. Thanks for the help! 👍

    Avatar: hafunerix
    hafunerix
    Participant
    July 16, 2026 at 13:13

    Thanks for the support! My topic “After today’s theme update, the ’email’ field is missing from the order summary.” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    July 16, 2026 at 13:13

    Dear hafunerix,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

  • Viewing 10 results - 1 through 10 (of 10 total)

The issue related to '‘After today’s theme update, the ’email’ field is missing from the order summary.’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.