Here is a guide to solve fatal errors related to “Uncaught WC_Data_Exception: Invalid billing email address “ [your directory where you installed WordPress].
Table of content
- Introduction Fatal Error
- How fatal errors impact your website
- What is an Uncaught WC_Data_Exception
- Invalid Billing Email Address Error Log
- The process to solve Uncaught WC_Data_Exception
Introduction To Fatal Errors
Fatal errors are critical errors – for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP’s default behavior is to display them to the user when they take place.
This error is usually seen when you take a back-up of your live wordpress webiste using plugin like All-in-One WP Migration or some sort of backup plugin. When you import the backup files these plugins changes the admin email to domain@localhost or foldername@localhost.
How fatal errors impact your website
Fatal errors are to be resolved immediately. As mentioned above these errors tends to cause the immediate termination of the script – What this means is your website will not be rendered.
What is an Uncaught WC_Data_Exception Error
Uncaught WC_Data_Exception error simply means that we have some data that doesn’t match the data format
In this case, it simply means that you have an email address in your database that doesn’t match the format of the email address. This error may occur if you accidentally change the email address to a name or to some other sort of string.
Invalid Billing Email Address Error Log
[03-Sep-2021 13:08:50 UTC] PHP Fatal error: Uncaught WC_Data_Exception: Invalid billing email address in E:\work\htdocs\agency\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php:856
The process to solve Uncaught WC_Data_Exception: Invalid billing email address
- Go to your database i.e phpmyadmin
- Go to the
wp_options
Invalid billing email address phpmyadmin panel - Click on edit
admin_email
row - Change the
admin_email
to a real emailInvalid billing email address phpmyadmin panel - Come back to your Dashboard and refresh the page
- Go to
Setting > General Setting > Administration Email Address
(Now the Administration Email Address is what you put in the database) - Don’t change anything here just scroll down to the bottom and hit the save changes button
- Now from your dashboard go to
User > Edit Admin
if the email box is not updated automatically change the email here also. - Scroll down to the bottom and update the changes
- Done
- Refresh your website. You don’t see any error
Conclusion: This error occurs when an email address is not the real one. It might be domain@localhost or some sort of name, changing the email field in the wp_options will remove this error. The proper email input field expect the email format to be name@domain.com
Note: If you want more help please contact us using Contact Us Form here.