=== Selektable ===
Contributors: selektable
Tags: virtual try-on, product visualization, woocommerce, try before you buy, AI shopping
Requires at least: 6.9
Tested up to: 6.9
Stable tag: 1.5.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI virtual try-on and room visualization for WordPress and WooCommerce. Reduce returns, boost conversions, and let customers try before they buy.

== Description ==

= THE AI-POWERED VIRTUAL TRY-ON AND ROOM VISUALIZATION PLUGIN FOR WORDPRESS =

**Selektable** is an AI shopping widget that lets customers see how products look on themselves or in their home before buying. Embed the experience directly on any WordPress or WooCommerce product page and give shoppers the confidence to buy.

There are two widget types:

* **Virtual Try-On:** Customers upload a photo of themselves and the AI renders the selected clothing on their image. Built for fashion and apparel stores.
* **Room Visualization:** Customers upload a photo of their space and see the product placed realistically inside it. Built for furniture and home décor stores.

Works with or without WooCommerce. When WooCommerce is active, you get automatic product page integration with full cart support. Without WooCommerce, use shortcodes to embed the widget anywhere on your site.

= WHY STORES CHOOSE SELEKTABLE =

* **Fewer returns:** Customers see exactly how products look before buying, so purchase decisions stick.
* **Higher conversions:** Immersive try-before-you-buy experiences give shoppers the confidence to add to cart.
* **Built-in lead capture:** Collect customer contact details directly through the widget with no extra setup.
* **Social sharing:** Each session generates a unique shareable page. Customers share their results on WhatsApp and other channels, driving organic reach for your store.
* **Performance analytics:** A real-time dashboard tracks visualizations, conversions, and revenue attributed to Selektable.

= FEATURES =

* **Easy setup:** Connect your store in minutes by entering your Widget ID from the Selektable dashboard.
* **Works on any WordPress site:** WooCommerce is optional. Use shortcodes to place the widget anywhere.
* **Fully customizable button:** Control the button text, background color, text color, border, and border radius per integration.
* **WhatsApp sharing:** Customers can share their try-on or room visualization result directly via WhatsApp.
* **Privacy-first:** Customer-uploaded photos are automatically deleted after a configurable retention period (default: 30 days). No photos are stored in your WordPress database.

= WITH WOOCOMMERCE =

* **Automatic placement:** Display the widget button before or after the Add to Cart button, or after the product summary.
* **Flexible activation:** Enable the widget for all products, specific categories, specific tags, or per product.
* **Per-product control:** Override global settings to force-enable or force-disable the widget on individual products.
* **Cart integration:** Customers can add products to their WooCommerce cart directly from the Selektable widget.
* **Variable products:** The widget updates automatically when a customer selects a variation (color, size, etc.).
* **Order attribution:** Logged-in customer identity is passed to Selektable for accurate conversion tracking.
* **Dimension support:** Product width, height, and length are automatically passed to the widget for accurate room visualization.
* **Override image:** Set a custom generation image per product, separate from the default WooCommerce product image.

= REQUIREMENTS =

* A Selektable account at [selektable.com](https://selektable.com) with an active widget
* WooCommerce (optional, for product page and cart integration)

= PRIVACY =

Selektable connects to an external service at `app.selektable.com` to process AI generations. Product data is sent to the Selektable service when a customer opens the widget. Customer photos are processed securely and deleted automatically after 30 days by default. No photo data is stored in your WordPress database. See the [Selektable Privacy Policy](https://selektable.com/privacy) for full details.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/selektable` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings > Selektable** to configure the plugin.
4. Enter your **Store ID** from your Selektable dashboard under **General Settings** and click **Save Settings**.
5. Click **Add New** to create an integration and enter your Widget ID from your Selektable dashboard.
6. Choose a **Shortcode** integration for any site, or a **WC Product Page** integration if WooCommerce is active.

== Configuration ==

= Integration Types =

* **WC Product Page** (requires WooCommerce): Automatically displays the widget button on product pages based on activation rules.
* **Shortcode:** Place the widget button anywhere using the `[selektable_button]` shortcode.

= General Settings =

* **Store ID:** Your Selektable Store ID (required). Find this in your Selektable dashboard under your store settings. The widget will not function without this.

= Button Settings (per integration) =

* **Widget ID:** Your Selektable widget ID (e.g., `wgt_abc123`). Find this in your Selektable dashboard.
* **Button Text:** The text shown on the button (default: "Try it on")
* **Button CSS Class:** Custom CSS classes for additional styling
* **Button Background Color:** Hex color for the button background
* **Button Text Color:** Hex color for the button label
* **Button Border Radius:** Rounded corners in pixels
* **Button Border Color:** Hex color for the button border

= WooCommerce Product Page Settings =

* **Button Placement:** Where to display the button on product pages. Options: after Add to Cart (default), before Add to Cart, or after product summary.
* **Activation Mode:** Enable the widget for all products, specific categories, or specific tags.

= Per-Product Settings (WooCommerce) =

Edit any product and find the "Selektable Widget" meta box in the sidebar:

* **Widget Status:** Override global settings to force-enable or force-disable the widget for this product.
* **Override Generation Image:** Use a specific image for AI generation instead of the default product image.

== Shortcode ==

Use the `[selektable_button]` shortcode to place the button anywhere:

`[selektable_button]`

With custom button text and CSS class:

`[selektable_button text="View in Your Room" class="my-custom-button"]`

With a specific widget ID:

`[selektable_button widget_id="wgt_abc123"]`

When used on a WooCommerce product page, the shortcode automatically passes product data to the widget. Outside of product pages, the widget opens without product context.

== Hooks and Filters ==

= Available Filters =

* `selektable_should_display_widget`: Control whether to show the widget button for a given integration and product
* `selektable_button_text`: Modify the button label text
* `selektable_button_class`: Modify the button CSS classes
* `selektable_product_data`: Modify the product data sent to the widget (WooCommerce only)

= Examples =

`
// Hide the widget for out-of-stock products (WooCommerce)
add_filter('selektable_should_display_widget', function($show, $integration, $product) {
    if ($product && !$product->is_in_stock()) {
        return false;
    }
    return $show;
}, 10, 3);

// Add custom fields to the widget product payload (WooCommerce)
add_filter('selektable_product_data', function($data, $product) {
    $data['customField'] = get_post_meta($product->get_id(), 'my_custom_field', true);
    return $data;
}, 10, 2);
`

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. Selektable works on any WordPress site. Without WooCommerce, use shortcodes to place the widget button wherever you need it. WooCommerce adds automatic product page integration, cart features, and order attribution.

= Where do I get my Widget ID? =

Log in to your Selektable dashboard at [app.selektable.com](https://app.selektable.com) and copy your Widget ID from the widget settings. It looks like `wgt_abc123`.

= What types of products does Selektable support? =

Selektable supports two use cases: **virtual try-on** for fashion and apparel, and **room visualization** for furniture and home décor. The widget type is configured inside your Selektable dashboard, not in WordPress.

= Can I use different widgets for different products? =

Yes. Create multiple integrations in **Settings > Selektable**, each with a different Widget ID and activation rules. For example, one widget for your clothing category and another for your furniture category.

= Does this work with variable products? =

Yes. When WooCommerce is active, the widget automatically updates to reflect the selected variation's image when a customer picks a different option (color, size, etc.).

= Can customers add to cart from the widget? =

Yes. When WooCommerce is active, cart integration is enabled automatically. Customers can add products to their WooCommerce cart directly from inside the Selektable widget.

= Does the plugin support product dimensions? =

Yes. When WooCommerce is active, product width, height, and length are automatically passed to the widget. This enables accurate room visualizations for furniture and home décor products.

= How does lead capture work? =

The Selektable widget includes built-in lead capture. Customer contact details collected through the widget are sent to your Selektable dashboard. No additional configuration is required in WordPress.

= What is the sharing feature? =

After completing a try-on or room visualization, Selektable generates a unique shareable page for that result. Customers can share directly via WhatsApp or other channels, helping drive organic reach for your store.

= Will this slow down my site? =

The widget embed script is loaded asynchronously and only initializes when a customer interacts with the button. There is no impact on page load performance for visitors who do not open the widget.

= Is this GDPR compliant? =

Selektable is designed with privacy in mind. Customer photos are stored securely and deleted automatically after a configurable retention period (default: 30 days). No photo data is stored in your WordPress database. Review the [Selektable Privacy Policy](https://selektable.com/privacy) and Terms of Service for your compliance assessment.

= What does Selektable cost? =

Start with a **free 14-day trial** — no credit card required. During the trial, generations are charged at €0.20 per image. After the trial, the **Standard plan** is €99/month plus €0.20 per image. An **Enterprise plan** is available for stores with 1,000+ generations per month, with volume pricing and a dedicated account manager. Visit [selektable.com](https://selektable.com) for current pricing.

= Where can I get support? =

Visit [selektable.com](https://selektable.com) to get in touch with the Selektable team.

== Screenshots ==

1. Settings page: manage integrations
2. Product meta box (WooCommerce): per-product overrides
3. Widget button on product page
4. Widget in action: virtual try-on experience

== Third-Party Service Disclosure ==

This plugin connects to the **Selektable** external service to provide virtual try-on and room visualization features.

**Service:** [Selektable](https://selektable.com)
**App URL:** [https://app.selektable.com](https://app.selektable.com)

When the Selektable widget is active on a page, the plugin:

* Loads the widget embed script from `https://app.selektable.com/widgets/embed.js`
* Sends product data (name, price, images, dimensions) to the Selektable service for rendering (when WooCommerce is active)
* Transmits a visitor ID and session ID to the Selektable service for session tracking and order attribution
* Sends logged-in user identity (name, email) to the Selektable service if the user is authenticated

No data is sent until a customer interacts with the widget button.

**Selektable Terms of Service:** [https://selektable.com/terms](https://selektable.com/terms)
**Selektable Privacy Policy:** [https://selektable.com/privacy](https://selektable.com/privacy)

== Privacy Policy ==

This plugin stores and transmits the following data:

* **Visitor ID:** A unique identifier stored in the browser to track widget interactions across sessions.
* **Session ID:** A per-session identifier for the current widget session.
* **User Identity:** For logged-in customers, the plugin sends the user's display name and email address to the Selektable service for order attribution.
* **Product Data:** When WooCommerce is active, product name, price, image URLs, and dimensions are sent to the Selektable service when the widget is opened.

All data is transmitted to the Selektable service at `app.selektable.com` over HTTPS. No personal data is stored in the WordPress database by this plugin beyond standard WooCommerce order meta (visitor ID and session ID attached to orders placed through the widget).

Customer-uploaded photos are stored securely by Selektable and automatically deleted after a configurable retention period (default: 30 days).

For more details, see the [Selektable Privacy Policy](https://selektable.com/privacy).

== Changelog ==

= 1.5.0 =
* Add Store ID field to General Settings (required): identifies your store for the embed script
* Store ID is output as data-store-id attribute on the embed script tag

= 1.4.0 =
* Rename from "Selektable for WooCommerce" to "Selektable"
* WooCommerce is now optional; plugin works on any WordPress site
* Move settings from WooCommerce to Settings > Selektable
* Add shortcode support for non-WooCommerce sites
* WooCommerce features (product page integration, cart, orders) activate automatically when WC is detected

= 1.2.0 =
* New multi-integration architecture; configure multiple widgets with different activation rules
* Add integration management UI with modal-based editing
* Add shortcode integration type for flexible widget placement
* Add per-integration button styling (background, text color, border radius, border color)
* Add scoped CSS with custom properties for reliable button styling
* Improve cart integration with robust order attribution via cart item data
* Fix button styling being overridden by theme styles

= 1.1.8 =
* Fix button styling to override theme styles using scoped CSS with !important
* Fix border style not rendering when only border-color was set

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.5.0 =
A Store ID field has been added to Settings > Selektable. Enter your Store ID from the Selektable dashboard to ensure the widget continues to function correctly.

= 1.4.0 =
WooCommerce is now optional. Settings have moved to Settings > Selektable. All existing integrations will continue to work.

= 1.2.0 =
New multi-integration architecture with per-widget configuration and improved button styling options.

= 1.1.8 =
Fixed button styling being overridden by theme styles.

= 1.0.0 =
Initial release of Selektable.
