-
Notifications
You must be signed in to change notification settings - Fork 219
WooCommerce templates: two 404 requests when loading the templates list #5327
Comments
After some investigation, I will summarize what I discovered. The request The first request is done by this component on GB. Since the request fails, the code uses the More or less the same thing happens for the second request. The request is done by this component. Since the request fails, the code uses the In conclusion, if we want to avoid this error, we should create a REST endpoint, so GB can fetch the request correctly. What do you think? @Aljullu |
Thanks for investigating this @gigitux and for posting links to the code, that was very useful. Hope you don't mind that I continued your research. It turns out the REST endpoint already exists, it's provided by WordPress core. However it must be called in the form I created a fix for this in #5375. Hope you don't mind that I picked it up, but after the investigation, it made sense to directly create the PR. 🙏 |
WP makes two 404 requests when loading the Templates list (in Appearance > Editor > Templates). Those requests are:
/wp-json/wp/v2/themes/woocommerce
/wp-json/wp/v2/plugins/WooCommerce
While nothing seems to break because of that, we should try to avoid making unnecessary requests.
To reproduce
Steps to reproduce the behavior:
Expected behavior
We should investigate why those requests return 404 and avoid them.
The text was updated successfully, but these errors were encountered: