| 开发者 | proteside |
|---|---|
| 更新时间 | 2026年10月28日 23:16 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
pk_live_…).shield.js asynchronously from the Proteside CDN — exactly the two tags the dashboard gives you, in the right order.<head> when a theme or plugin prints scripts before wp_head.Proteside.getStatus() in the browser console: installationOrderValid must be true.Yes. The plugin activates an existing Proteside subscription. You can create one at proteside.com.
No. The pk_ key is public by design — it already appears in your store's HTML. Keep your account credentials safe; the SDK key itself is not sensitive.
Yes. Page detection uses WooCommerce conditional tags plus block detection, so both classic and block cart/checkout are supported.
The Proteside SDK no longer renders a badge. The badge is a static HTML snippet you copy from your dashboard (Settings → Store) and paste wherever you want it in your theme; the plugin does not add it for you.
The plugin copies your active rules and allowed GTM containers from the dashboard into the inline bootstrapper (same <script> tag). Blocking then starts before the SDK downloads its remote configuration. It is refreshed on every status check and is on by default.
The bootstrapper must be the first script in <head>. If another script runs before it, the SDK reports INSTALLATION_ORDER_WARNING and Proteside.getStatus().installationOrderValid is false (protection continues, with partial coverage). The default wp_head priority 1 is enough for most themes; if a theme or plugin prints scripts earlier, enable Advanced → "Strict first position (output buffering)".
The plugin detects the change on its next status check and stops loading the script. During the billing grace period the script keeps loading and you'll see a reminder in the admin.
Only a definitive answer (HTTP 200 or 401) changes the decision. On timeouts or server errors the plugin keeps the last known status for up to 48 hours, then fails closed.
No network call happens on normal page loads — everything is cached locally and refreshed by WP-Cron. shield.js is loaded asynchronously; the inline bootstrapper is about 4 KB.
script-src: the inline bootstrapper (hash shown in Diagnostics, or a nonce/'unsafe-inline') plus https://cdn.proteside.com; connect-src: https://app.proteside.com and https://cdn.proteside.com. Use the hash from Diagnostics: it is computed from the exact tag WordPress prints on your site and changes when your inline rules change.
wp_print_inline_script_tag() / wp_get_script_tag()), so the wp_inline_script_attributes and wp_script_attributes filters apply (e.g. CSP nonces).https:// Proteside domains.load_plugin_textdomain()).GET /api/sdk/config are embedded as window.__PROTE_INLINE__ in the same tag as the bootstrapper (default on).order-pay). Defaults are now checkout + order payment page + order confirmation; cart is off by default.<head>.inactive status, domain-mismatch advisory notice, connection-error notice.data-safe-url (the SDK no longer renders a badge; it is a static snippet from the dashboard).