• Resolved mabdullaharfeen

    (@mabdullaharfeen)


    I moved my website from live to localhost and updated all plugins and theme. After updating woocommerce I am recieveing the following error.

    Fatal error: Uncaught WC_Data_Exception: Invalid billing email address in C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php:943 Stack trace: #0 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\class-wc-customer.php(1045): WC_Data->error(‘customer_invali…’, ‘Invalid billing…’) #1 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\data-stores\class-wc-customer-data-store-session.php(114): WC_Customer->set_billing_email(‘saad@localhost’) #2 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\class-wc-data-store.php(159): WC_Customer_Data_Store_Session->read(Object(WC_Customer)) #3 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\class-wc-customer.php(125): WC_Data_Store->read(Object(WC_Customer)) #4 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\class-woocommerce.php(885): WC_Customer->__construct(16557, true) #5 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\wc-core-functions.php(2569): WooCommerce->initialize_cart() #6 C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\class-woocommerce.php(704): wc_load_cart() #7 C:\xampp\htdocs\direct\wp-includes\class-wp-hook.php(324): WooCommerce->init(”) #8 C:\xampp\htdocs\direct\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 C:\xampp\htdocs\direct\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #10 C:\xampp\htdocs\direct\wp-settings.php(643): do_action(‘init’) #11 C:\xampp\htdocs\direct\wp-config.php(98): require_once(‘C:\\xampp\\htdocs…’) #12 C:\xampp\htdocs\direct\wp-load.php(50): require_once(‘C:\\xampp\\htdocs…’) #13 C:\xampp\htdocs\direct\wp-blog-header.php(13): require_once(‘C:\\xampp\\htdocs…’) #14 C:\xampp\htdocs\direct\index.php(17): require(‘C:\\xampp\\htdocs…’) #15 {main} thrown in C:\xampp\htdocs\direct\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php on line 943

    There has been a critical error on this website.

    Kindly Help Out here

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi there,

    Thank you for contacting WooCommerce Plugin Support. I understand you are having trouble with the invalid billing email address error on your site.

    This error usually occurs when you move your site from live to localhost and the billing email address is not valid or compatible with your local server. Here are the steps that you can try:

    • Go to the wp_options table in your database and change the admin_email option to a valid email address. You can use phpMyAdmin or any other database management tool to do this.
    • Go to WooCommerce > Settings > General and make sure you have a valid email address set for the Store Email Address field. This is the email address that WooCommerce uses to send emails to customers and admins.
    • Go to WooCommerce > Settings > Emails and check the settings for each email notification. Make sure you have valid email addresses for the From and To fields. You can also test the email functionality by sending a test email to yourself.
    • If you are using any email-related plugins, such as SMTP plugins or email customizer plugins, make sure they are configured correctly and compatible with your local server. You can also try to deactivate and reactivate them to see if that helps.

    I hope this helps you to resolve your issue. If you have any further questions or need more assistance, please feel free to reply to this thread.

    Thank you for choosing WooCommerce and have a great day!

    Thread Starter mabdullaharfeen

    (@mabdullaharfeen)

    There is no option in WooCommerce?>?Settings?>?General for billing email. and the email setting is also configured properly.

    Hi there @mabdullaharfeen,

    It appears that the issue you’re experiencing is related to the billing email address being set as ‘saad@localhost‘. WooCommerce expects a valid email address format, and ‘saad@localhost’ is not considered valid because it doesn’t contain a top-level domain, like .com or .net.

    To resolve this, you will need to access your database (using phpMyAdmin or similar), navigate to the ‘wp_usermeta‘ table, and locate the meta_keybilling_email‘ for your user ID and replace ‘saad@localhost’ with a valid email address.

    If you’re uncomfortable making these changes, I would recommend seeking assistance from a developer or someone with experience in handling databases.

    Please create a backup of your site before performing these changes.

    Let us know how it goes.

    Thread Starter mabdullaharfeen

    (@mabdullaharfeen)

    I have check the tables wp_usermeta but there is coloum of meta_key?‘billing_email in it and there is no record of saad@localhost in it as well. I want to update my live site, my live site is very important. So kindly help me out here.

    Hi there,

    Thanks again for getting back to us!

    I have check the tables?wp_usermeta?but there is coloum of?meta_key?‘billing_email?in it and there is no record of saad@localhost in it as well. I want to update my live site, my live site is very important. So kindly help me out here.

    Could you please try uninstalling WooCommerce on your live site, then reinstalling it back and letting us know how it goes?

    Thread Starter mabdullaharfeen

    (@mabdullaharfeen)

    I tried uninstalling WooCommerce? in local site as my I canot test it on the live site because its risky i canot afford to loose my website.
    the result on local server is the same, the error didnt go away.

    Saif

    (@babylon1999)

    Hello @mabdullaharfeen,

    I tried uninstalling WooCommerce in local site as my I canot test it on the live site because its risky i canot afford to loose my website.

    Sorry to know that didn’t help!

    Please follow the steps outlined here: https://stackoverflow.com/a/69046607

    You don’t need to access the database as shown in the first and second steps. Simply navigate to this page on your site: https://site.com/wp-admin/options.php


    Link to image: https://d.pr/i/NxIWeK

    Let us know how it goes!

    Thread Starter mabdullaharfeen

    (@mabdullaharfeen)

    Hello, I did it but it did not change any thing , I have replaced @localhost in database and updated it, moreover I have updated all administrator fileds in woocommerce and wordpress but the issue is still not resolved.

    Saif

    (@babylon1999)

    Hello, I did it but it did not change any thing , I have replaced @localhost in database and updated it, moreover I have updated all administrator fileds in woocommerce and wordpress but the issue is still not resolved.

    According to this thread, the issue is also occurring on an XAMPP server, which leads me to believe it might be related to XAMPP’s configuration.

    To confirm, could you please check if you encounter the same error when cloning your live website to LocalWP?

    Look forward to hearing back from you.

    Aaron

    (@aaron13100)

    I solved this by using phpmyadmin, selecting the database, choosing “search,” searching for the bad email (whatever@localhost), and manually replacing the values in the database with a valid email address.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal error: Uncaught WC_Data_Exception: Invalid billing email address’ is closed to new replies.