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.
1 parent 7bb7f21 commit 1a1cc3eCopy full SHA for 1a1cc3e
index.mjs
@@ -191,11 +191,7 @@ export default class WooCommerceRestApi {
191
Accept: "application/json"
192
};
193
// only set "User-Agent" in node environment
194
- // the checking method is identical to upstream axios
195
- if (
196
- typeof process !== "undefined" &&
197
- Object.prototype.toString.call(process) === "[object process]"
198
- ) {
+ if (typeof window === "undefined") {
199
headers["User-Agent"] =
200
"WooCommerce REST API - JS Client/" + this.classVersion;
201
}
0 commit comments