WooCommerce integration
Selektable provides an official WordPress plugin for WooCommerce that handles embed script injection, product detection, variant image updates, and cart integration out of the box.Option A: WordPress plugin (recommended)
The easiest way to integrate Selektable with WooCommerce is the official plugin.Installation
1
Download the plugin
In the Selektable dashboard, open your widget and click Embed Instructions. Select the WooCommerce tab and download the plugin zip file.
2
Upload to WordPress
In your WordPress admin, go to Plugins → Add New → Upload Plugin. Select the downloaded zip file and click Install Now.
3
Activate the plugin
After installation, click Activate Plugin.
4
Configure
Go to Settings → Selektable, enter your Store ID from the dashboard under General Settings, then click Add New to add an integration with your Widget ID.
- Adds the embed script to your site’s footer
- Injects a widget button after the “Add to Cart” button on product pages
- Detects the current product and its images
- Updates the product image when a customer selects a different variation
- Handles cart integration via the WooCommerce Cart API
Requires WordPress 6.9+ and WooCommerce 8.8.6+.
Option B: manual integration
If you prefer not to use the plugin, you can add the integration manually via your theme’sfunctions.php.
1. Add the embed script
2. Add the widget button
3. Handle variation changes (optional)
4. Cart integration (optional)
Auto-Detection
The SDK automatically detects WooCommerce product data from the page DOM, including:- Product ID from
postid-*body class - Product ID from
form.variations_form[data-product_id] - Product ID from
button[name="add-to-cart"]value - Product ID from
input[name="product_id"]value
productId in the open() call, the widget can often find the right product on WooCommerce pages.
Order webhooks
To enable conversion tracking, configure a webhook in WooCommerce:- Go to WooCommerce → Settings → Advanced → Webhooks
- Add a new webhook:
- Topic: Order created
- Delivery URL:
https://app.selektable.com/api/webhooks/woocommerce/orders - Status: Active