Reputation: 1297
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.
Upvotes: 1
Views: 5134
Reputation: 1
Try to change Timezone to your local time from wordpress settings. It worked for me.
Upvotes: 0
Reputation: 1779
For 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
Upvotes: 0
Reputation: 1297
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 :
location ~ ^/wp-json/ {
rewrite ^/wp-json/(.*?)$ /?rest_route=/$1 last;
}
and then, restart the nginx
service
Upvotes: 8