I tried to deactivate all plugins except WooCommerce and tried to use a basic Wordpress theme. But it is still not fixed.
What else could I try?
Here are a couple things you can try: Increase Memory Limit: Sometimes, PHP memory limit issues can cause such errors. Try increasing the memory limit by adding define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php file.
Check WooCommerce Status: Go to WooCommerce > Status in your WordPress admin to see if there are any alerts or recommendations.