I tried to install woocommerce on a fresh WordPress 5.4.1 installation.
Woocommerce plugin was successfully installed, but when setting up the store, there’s an error, it says There was a problem updating your preferences
, I checked the browser console, and from the ajax call it received :
{"code":"woocommerce_rest_cannot_view","message":"You must supply an array of options.","data":500}
I tried to remove the application folder and database, then recreated a new empty database then reinstall the WordPress, then setting up the store, but still receiving the same error.
3
Answers
I finally found a workaround, I'm sharing it just in case anyone having the same problem as I do.
Someone suggested me to check the Site Health, so I went over there and found 3 warnings, the last one was the only one I had to pay attention, it said
The REST API did not process the 'context' query parameter correctly
, so I googled it and then found a workaround, then applied it, and finally the error gone.Here's the workaround, need to add this in the Nginx configuration :
and then, restart the
nginx
serviceFor any one have the problem There was a problem updating your preferences
at the current time and this may be changed soon
use PHP version 7.2
this will solve the problem which mostly happens when you use PHP version 7.4
Try to change Timezone to your local time from wordpress settings. It worked for me.