UPDATE:
I think I’ve fixed this! My database needed repairing!!!
I randomly tried this technique I found elsewhere and it seemed to do the trick:
1.) Using FileZilla I download via FTP wp-config.php from the httpdocs folder of my website. I kept a renamed copy (wp-config.bak) of the original on my server just in case anything went wrong.
2.) I edited wp-config.php and added the following line of code:
// Repair Database Option
define('WP_ALLOW_REPAIR', true);
3.) Uploaded it using Filezilla back to the same folder i.e. httpdocs.
4.) Navigated to https:// <www.domain-name.com> /wp-admin/maint/repair.php
5.) Clicked the repair database button.
6.) I got errors.
- wp_usermeta: 1 client is using or hasn’t closed the table properly
- wp_posts: 1 client is using or hasn’t closed the table properly
- wp_options: 3 clients are using or haven’t closed the table properly
- wp_postmeta: 1 client is using or hasn’t closed the table properly
7.) I felt brave so I clicked back on my browser and clicked the repair database button a second time – No Errors reported!!!
8.) I restored the original wp-config.php file to prevent anyone exploiting the repair option.
9.) I reinstalled WooCommerce from my dashboard
10.) This time it asked me if I wanted to install the WooCommerce pages. I clicked Install Pages. They appeared in trash!?! I selected them all and restored them.
I can now add products to my shopping cart. All seems fine again.
But I can offer no explanation to my solution???
Would anyone will knowledge and experience care to elaborate?