Replace hardcoded hosts with example.com placeholders
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
category: "config",
|
||||
defaults: {
|
||||
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: {
|
||||
consumerKey: { type: "text" },
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<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 class="form-row">
|
||||
<label for="node-config-input-consumerKey"><i class="fa fa-key"></i> Consumer Key</label>
|
||||
@@ -47,7 +47,7 @@
|
||||
<h3>Details</h3>
|
||||
<p>Configure your WooCommerce store connection.</p>
|
||||
<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 Secret</b> – Paired with Consumer Key</li>
|
||||
</ul>
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = function (RED) {
|
||||
RED.nodes.createNode(this, config);
|
||||
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.consumerSecret = config.consumerSecret || "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user