8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest WooCommerce and now the latest WordPress. Everything worked fine (last night) before update this morning.
curl https://example.com/wp-json/wc/v1/products/9522 -u key:secret
works fine, it gives the product info. Log on the server side (Apache) is "GET /wp-json/wc/v1/products/9522 HTTP/1.1" 200 6484 "-" "curl/7.47.0"
"GET /wp-json/wc/v1/products/9522 HTTP/1.1" 200 6484 "-" "curl/7.47.0"
When using the following python it doesn't work.
from woocommerce import API wcapi = API( url="https://example.com", consumer_key="key", consumer_secret="secret", wp_api=True, version="wc/v1" ) print(wcapi.get("products/9522").json())
Result: {'data': {'json_error_code': 4, 'json_error_message': 'Syntax error', 'status': 400}, 'code': 'rest_invalid_json', 'message': 'Invalid JSON body passed.'}
{'data': {'json_error_code': 4, 'json_error_message': 'Syntax error', 'status': 400}, 'code': 'rest_invalid_json', 'message': 'Invalid JSON body passed.'}
Server log: "GET /wp-json/wc/v1/products/9522 HTTP/1.1" 400 4742 "-" "WooCommerce API Client-Python/1.2.0"
"GET /wp-json/wc/v1/products/9522 HTTP/1.1" 400 4742 "-" "WooCommerce API Client-Python/1.2.0"
I made no changes to code, simply updated WordPress from 4.6 to 4.7
The text was updated successfully, but these errors were encountered:
Seems like the problem goes away when commeting out the following.
woocommerce/api.py - line 67 "content-type": "application/json;charset=utf-8",
"content-type": "application/json;charset=utf-8",
Sorry, something went wrong.
01b5000
Fixed on 1.2.1, thanks for report it.
No branches or pull requests
Latest WooCommerce and now the latest WordPress. Everything worked fine (last night) before update this morning.
curl https://example.com/wp-json/wc/v1/products/9522 -u key:secret
works fine, it gives the product info. Log on the server side (Apache) is
"GET /wp-json/wc/v1/products/9522 HTTP/1.1" 200 6484 "-" "curl/7.47.0"
When using the following python it doesn't work.
Result:
{'data': {'json_error_code': 4, 'json_error_message': 'Syntax error', 'status': 400}, 'code': 'rest_invalid_json', 'message': 'Invalid JSON body passed.'}
Server log:
"GET /wp-json/wc/v1/products/9522 HTTP/1.1" 400 4742 "-" "WooCommerce API Client-Python/1.2.0"
I made no changes to code, simply updated WordPress from 4.6 to 4.7
The text was updated successfully, but these errors were encountered: