Install on WordPress

WidgetHelp and docs

01Choose plugin or HTML

Use the Stockisto plugin for shortcode placement and WooCommerce SKU detection. For a brand-wide widget, the saved snippet also works in a Custom HTML block without the plugin. Copy your widget from Locator → Widgets; the plugin download is under On your site, Install on WordPress.

02Install the plugin

In WordPress, choose Plugins → Add New → Upload Plugin, upload the ZIP and activate it. Open Settings → Stockisto Widget and enter the saved Embed id. The plugin uses https://api.stockisto.com and https://cdn.stockisto.com. For a TEST embed, use the manual snippet with its generated TEST origins instead. Choose Read the current WooCommerce product as the SKU source for product pages.

03Place a Shortcode block

Add a Shortcode block to the page or template. Use the id of your saved widget in place of this example. A shortcode is expanded by WordPress before the page reaches the browser; Custom HTML does not expand it.

[stockisto_widget embed="we_0123456789abcdef0123456789abcdef"]

04WooCommerce product templates

The plugin reads the current WooCommerce product’s SKU. Variable products use the product available to the server render; do not assume a browser-only variant switch changes the widget. To place the saved widget on every product, add this hook to a child theme’s functions.php. The plugin must be active.

add_action( 'woocommerce_after_single_product_summary', function () {
    if ( function_exists( 'stockisto_widget_render' ) ) {
        stockisto_widget_render();
    }
} );

05Manual HTML placement

For a brand-wide widget, paste your saved snippet into Custom HTML and publish. For product pages, use the plugin shortcode or the generated WooCommerce PHP snippet in a PHP template. A Custom HTML block does not execute PHP. Never paste a literal PHP product key into the browser.

<script
    src="https://cdn.test.stockisto.com/widget.js"
    data-api-base="https://api.test.stockisto.com"
    data-embed="we_0123456789abcdef0123456789abcdef"
    async
></script>

06Check the published page

Open two WooCommerce products and check their SKU values. In embed mode, a missing SKU emits data-sku=""; product-dependent rendering is suppressed. A legacy product snippet without a usable SKU renders nothing. If no markup appears, inspect source for <!-- Stockisto widget not rendered:. The comment names the reason. Then follow the installation checks and CSP rules.