Skip to content

Commit ac8f6af

Browse files
author
derwentx
committed
extra remedy for woocommerce_rest_cannot_view
1 parent f98ef85 commit ac8f6af

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

wordpress/api.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,23 @@ def request_post_mortem(self, response=None):
114114
remedy = "Try deleting the cached credentials at %s" % \
115115
self.auth.creds_store
116116

117+
elif 'code' == 'woocommerce_rest_cannot_view':
118+
if not self.auth.query_string_auth:
119+
remedy = "Try enabling query_string_auth"
120+
else:
121+
remedy = (
122+
"This error is super generic and can be caused by just "
123+
"about anything. Here are some things to try: \n"
124+
" - Check that the account which as assigned to your "
125+
"oAuth creds has the correct access level\n"
126+
" - Enable logging and check for error messages in "
127+
"wp-content and wp-content/uploads/wc-logs\n"
128+
" - Check that your query string parameters are valid\n"
129+
" - Make sure your server is not messing with authentication headers\n"
130+
" - Try a different endpoint\n"
131+
" - Try enabling HTTPS and using basic authentication\n"
132+
)
133+
117134
response_headers = {}
118135
if hasattr(response, 'headers'):
119136
response_headers = response.headers

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy