Replace hardcoded hosts with example.com placeholders

This commit is contained in:
2026-10-14 23:21:16 +02:00
parent e3b89fc74c
commit f08bcc48eb
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ The integrate script:
| Consumer Key | From WooCommerce → Settings → Advanced → REST API | | Consumer Key | From WooCommerce → Settings → Advanced → REST API |
| Consumer Secret | Paired with Consumer Key | | Consumer Secret | Paired with Consumer Key |
**Important:** Base URL must be `https://shop.hanssonit.se/wp-json/wc/v3/`. **Important:** Base URL is the WooCommerce REST API URL, e.g. `https://example.com/wp-json/wc/v3/`.
The API key must have at least Read permission. The user the key is bound to The API key must have at least Read permission. The user the key is bound to
must be an Administrator or have equivalent capabilities. must be an Administrator or have equivalent capabilities.
+3 -3
View File
@@ -3,7 +3,7 @@
category: "config", category: "config",
defaults: { defaults: {
name: { value: "" }, name: { value: "" },
baseUrl: { value: "https://shop.hanssonit.se/wp-json/wc/v3", required: true } baseUrl: { value: "https://example.com/wp-json/wc/v3", required: true }
}, },
credentials: { credentials: {
consumerKey: { type: "text" }, consumerKey: { type: "text" },
@@ -25,7 +25,7 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="node-config-input-baseUrl"><i class="fa fa-server"></i> Base URL</label> <label for="node-config-input-baseUrl"><i class="fa fa-server"></i> Base URL</label>
<input type="text" id="node-config-input-baseUrl" placeholder="https://shop.hanssonit.se/wp-json/wc/v3"> <input type="text" id="node-config-input-baseUrl" placeholder="https://example.com/wp-json/wc/v3">
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="node-config-input-consumerKey"><i class="fa fa-key"></i> Consumer Key</label> <label for="node-config-input-consumerKey"><i class="fa fa-key"></i> Consumer Key</label>
@@ -47,7 +47,7 @@
<h3>Details</h3> <h3>Details</h3>
<p>Configure your WooCommerce store connection.</p> <p>Configure your WooCommerce store connection.</p>
<ul> <ul>
<li><b>Base URL</b> – Must be <code>https://shop.hanssonit.se/wp-json/wc/v3</code></li> <li><b>Base URL</b> – Your WooCommerce REST API URL, e.g. <code>https://example.com/wp-json/wc/v3</code></li>
<li><b>Consumer Key</b> – From WooCommerce → Settings → Advanced → REST API</li> <li><b>Consumer Key</b> – From WooCommerce → Settings → Advanced → REST API</li>
<li><b>Consumer Secret</b> – Paired with Consumer Key</li> <li><b>Consumer Secret</b> – Paired with Consumer Key</li>
</ul> </ul>
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = function (RED) {
RED.nodes.createNode(this, config); RED.nodes.createNode(this, config);
const node = this; const node = this;
node.baseUrl = (config.baseUrl || "https://shop.hanssonit.se/wp-json/wc/v3").replace(/\/+$/, ""); node.baseUrl = (config.baseUrl || "https://example.com/wp-json/wc/v3").replace(/\/+$/, "");
node.consumerKey = config.consumerKey || ""; node.consumerKey = config.consumerKey || "";
node.consumerSecret = config.consumerSecret || ""; node.consumerSecret = config.consumerSecret || "";