8000 Fixed WordPress 4.7 compatibility, closes #23 · factorlibre/wc-api-python@01b5000 · GitHub
[go: up one dir, main page]

Skip to content

Commit 01b5000

Browse files
Fixed WordPress 4.7 compatibility, closes woocommerce#23
1 parent b248bb8 commit 01b5000

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

woocommerce/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def __request(self, method, endpoint, data):
6464
params = {}
6565
headers = {
6666
"user-agent": "WooCommerce API Client-Python/%s" % __version__,
67-
"content-type": "application/json;charset=utf-8",
6867
"accept": "application/json"
6968
}
7069

@@ -80,6 +79,7 @@ def __request(self, method, endpoint, data):
8079

8180
if data is not None:
8281
data = jsonencode(data, ensure_ascii=False).encode('utf-8')
82+
headers["content-type"] = "application/json;charset=utf-8"
8383

8484
return request(
8585
method=method,

0 commit comments

Comments
 (0)
0