=== Dresium – AI Virtual Try-On & Fitting Room for WooCommerce ===
Contributors: dresium, rgwebdev
Donate link: https://dresium.com/
Tags: virtual try-on, try on, virtual fitting room, ai fashion, woocommerce
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 3.4.18
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI virtual try-on for WooCommerce: shoppers see clothes on themselves before buying. Boost conversions, cut returns. 1,000 free credits.

== Description ==

**Dresium is an AI virtual try-on and virtual fitting room for WooCommerce fashion stores.** Shoppers upload one photo and instantly see themselves wearing your clothes, dresses and outfits, right on the product page. No app, no account, no setup for your customers.

**Try the full plugin for free.** Install, click one button and you get **1,000 welcome credits** instantly — enough to test every feature on your real store without entering a credit card. Credits are consumed only when a real shopper generates a virtual try-on; nothing is charged for failed generations or for your own testing clicks that don't produce an image.

Let your customers try before they buy: more confidence at checkout, higher conversion rates and fewer returns caused by "it didn't look like that on me".

https://www.youtube.com/watch?v=N_QtzYZvOCk

= Why fashion stores use Dresium =

* **Boost conversions** — shoppers see the product on their own body, not just on a model
* **Cut returns** — fewer surprises on fit and look means fewer returned orders
* **Free for your customers** — the Try-On button works for guest visitors and logged-in users alike, no signup required
* **Measure real impact** — built-in analytics show try-ons, purchases, conversion rate and revenue attributed to the virtual try-on
* **Pay only for results** — you (the merchant) pay per successful try-on generation; failed generations are refunded automatically

= How the AI virtual try-on works =

1. The shopper clicks "Try it on" on a product page
2. They upload a photo, take one with the camera or pick a sample model
3. Dresium's AI generates a realistic image of the shopper wearing that product in seconds
4. They can zoom, save the result to their gallery or share it on WhatsApp, then add to cart

= Key features =

* **Zero-setup virtual fitting room** — the Try-On button is injected automatically into WooCommerce product pages
* **Three integration methods** — automatic hook (default), Gutenberg block `Dresium Try-On CTA`, or shortcode `[dresium_tryon]`
* **Analytics dashboard** — real-time views, try-ons, purchases, conversion rate and attributed revenue with 7/30/90-day filters
* **Order attribution** — automatic tracking of purchases and refunds within a 7-day attribution window from the try-on
* **Full appearance customization** — button size, color palette presets, custom colors, typography, border radius, CTA text override
* **Category gating** — show the virtual try-on only on the categories you choose (dresses, shirts, jackets, etc.)
* **Whitelabel branding and AI video try-on** — unlocked when your credit balance reaches the whitelabel threshold (€100 by default)
* **Auto-topup** — keeps the service always available with no interruptions
* **GDPR-ready** — Privacy Policy, Data Processing Agreement (GDPR Article 28) and Terms of Service signature flow inside the WooCommerce settings
* **Multi-language storefront** — Italian, English, French, German and Spanish out of the box
* **Works with your builder and theme** — Elementor, Divi, WPBakery, Oxygen, Bricks and themes such as Storefront, Astra, Kadence, Woodmart and Flatsome
* **HPOS compatible** — full support for WooCommerce High-Performance Order Storage

= Pricing =

Dresium is free to install. You pay only for the AI generations your customers actually produce (pay-per-use), with credits deposited from the Billing tab. At the current pricing a try-on generation costs **€0.10** (10 credits × €0.01 per credit). Pricing is configured server-side and the Billing screen always shows the up-to-date value before you top up. See the FAQ for details on pricing and currency.

= Getting started =

1. Install and activate the plugin (WooCommerce must also be active)
2. Complete the B2B onboarding form in WooCommerce > Settings > Dresium (registers your store on Dresium and provisions an HMAC-secured API key)
3. Sign the legal documents (Privacy, DPA, Terms) from the Legal tab — required before the Try-On button becomes visible to your customers
4. Configure appearance, categories and advanced settings
5. Deposit credits from the Billing tab (optional auto-topup)
6. The virtual try-on button automatically appears on product pages within the enabled categories

= Requirements =

* WordPress 6.6 or higher
* WooCommerce 9.9 or higher
* PHP 7.4 or higher
* SSL/HTTPS required (Dresium API is HTTPS-only)

= Third-Party Services =

This plugin relies on the following external services:

**Dresium API (Virtual Try-On Service)**

* **Service Provider:** Dresium / EasyAdv S.r.l.
* **Purpose:** AI-powered virtual try-on image generation
* **When data is sent:** Each time a customer clicks "Try it on" and uploads a photo
* **Data transmitted:** Customer photo (for AI processing), product images (for overlay generation), your store domain and merchant ID (for HMAC authentication)
* **Data handling:** Photos are processed in real-time and not permanently stored unless the customer explicitly saves them to their personal gallery. Photos are never shared with third parties or used for AI training. Dresium acts as data processor and uses the AI services listed below as sub-processors.
* **Data Processing Agreement:** Merchants must accept a DPA before the Try-On button is exposed to customers, establishing Dresium as data processor under GDPR Article 28. The signature flow is inside the plugin (Legal tab).
* [Terms of Service](https://dresium.com/en/terms-and-conditions/)
* [Privacy Policy](https://dresium.com/en/privacy-policy/)
* [Data Processing Agreement](https://dresium.com/en/dpa/)

**Gemini AI by Google (AI Sub-Processor)**

* **Service Provider:** Google LLC
* **Purpose:** AI image generation for virtual try-on processing
* **When data is sent:** When Dresium API processes a virtual try-on request, it may route image generation to Gemini AI
* **Data transmitted:** Customer photos and product images are transmitted via Dresium servers to Google for AI processing
* **Data handling:** Data is processed by Google solely for image generation. Dresium maintains data processor responsibilities.
* [Gemini API Terms of Service](https://ai.google.dev/gemini-api/terms)
* [Google Privacy Policy](https://policies.google.com/privacy)

**Grok AI by xAI (AI Sub-Processor)**

* **Service Provider:** xAI Corp.
* **Purpose:** AI image and video generation for virtual try-on processing
* **When data is sent:** When Dresium API processes a virtual try-on request, it may route image or video generation to Grok AI
* **Data transmitted:** Customer photos and product images are transmitted via Dresium servers to xAI for AI processing
* **Data handling:** Data is processed by xAI solely for image and video generation. Dresium maintains data processor responsibilities.
* [Terms of Service](https://x.ai/legal/terms-of-service)
* [Privacy Policy](https://x.ai/legal/privacy-policy)

**Claude AI by Anthropic (AI Sub-Processor)**

* **Service Provider:** Anthropic PBC
* **Purpose:** AI-powered customer support agent
* **When data is sent:** When a user interacts with the Dresium support chatbot
* **Data transmitted:** Chat messages and conversation context are transmitted to Anthropic for response generation
* **Data handling:** Data is processed by Anthropic solely for customer support purposes. No customer photos are sent to this service.
* [Terms of Service](https://www.anthropic.com/legal/consumer-terms)
* [Privacy Policy](https://www.anthropic.com/legal/privacy)

**WhatsApp Sharing (Social Sharing Feature)**

* **Service Provider:** WhatsApp LLC (Meta Platforms, Inc.)
* **Purpose:** Allow users to share their virtual try-on results via WhatsApp
* **When data is sent:** Only when a user explicitly clicks the "Share on WhatsApp" button
* **Data transmitted:** A sharing URL is opened via the WhatsApp API (api.whatsapp.com) - no image data is sent directly, only a link to the shared page
* [WhatsApp Terms of Service](https://www.whatsapp.com/legal/terms-of-service)
* [WhatsApp Privacy Policy](https://www.whatsapp.com/legal/privacy-policy)

== Installation ==

1. Go to Plugins > Add New in your WordPress admin
2. Search for "Dresium"
3. Click "Install Now" and then "Activate"
4. Ensure WooCommerce is installed and active
5. Go to WooCommerce > Settings > Dresium and complete the onboarding form
6. Sign the legal documents in the Legal tab
7. Deposit initial credits from the Billing tab (or enable auto-topup)

== Frequently Asked Questions ==

= How does virtual try-on work in WooCommerce? =

Dresium adds a "Try it on" button to your product pages. The shopper uploads a photo and the AI generates an image of them wearing the product. Everything happens on your store, with no redirect to external sites.

= Is it a virtual fitting room for clothes? =

Yes. Dresium works as an AI virtual fitting room for clothing: t-shirts, shirts, jackets, dresses, pants, hoodies and more. Enable the Try-On button only on your fashion categories from the Categories tab.

= Do my customers need to register on Dresium? =

No. Dresium 3.x is a B2B service: you (the merchant) buy credits, your customers use the virtual try-on for free with no signup required. Guest access is enabled by default.

= How much does a try-on cost? =

The plugin is free to install. Each successful image generation consumes credits from your Dresium balance, and failed generations are refunded automatically. At the current pricing a try-on generation costs **€0.10** (10 credits × €0.01 per credit). Pricing is dynamic: the credit price, credits per generation and minimum recharge are configured server-side by Dresium and fetched by the plugin every hour. The Billing tab always shows the current cost per generation that will apply to your next top-up. Existing credits are always spent at the rate contracted at purchase — future pricing changes never invalidate deposits already made.

= Which currency are credits billed in? =

Credits are billed in EUR (€) via secure Stripe checkout. Merchants outside the Eurozone see the checkout amount in EUR; the actual charge on your card is in your local currency at your bank's daily exchange rate (banks typically add a 0–3% FX fee depending on the card issuer; fintech cards such as Revolut, Wise or N26 usually have 0% FX fee).

= Does virtual try-on really reduce returns? =

Shoppers see the product on themselves before buying, which removes many "it looked different" returns. The Analytics dashboard tracks purchases and refunds attributed to try-ons, so you can measure the effect on your own store.

= Does it work with any theme? =

Dresium is designed to work with most WooCommerce themes. It has been tested with Storefront, Astra, Kadence, Woodmart and Flatsome. The button can be positioned via three integration methods: automatic hook, Gutenberg block, or the `[dresium_tryon]` shortcode.

= How do I add the Try-On button on a theme with a page builder (Divi, Elementor, WPBakery)? =

Themes built with page builders often replace the WooCommerce product page layout with their own, which prevents the automatic hook from firing. In this case, add the button manually where you want it inside the builder:

- Divi: add a "Text" or "Code" module and paste the shortcode `[dresium_tryon]`
- Elementor: add the "Shortcode" widget and paste `[dresium_tryon]`
- WPBakery: add a generic shortcode element with `[dresium_tryon]`
- Gutenberg / Block editor: search for the "Dresium Try-On CTA" block

The shortcode reads the current product from the WooCommerce loop, so no parameters are required. When you use the shortcode or the Gutenberg block, we recommend also disabling the auto-injection in "WooCommerce > Settings > Dresium > Advanced > Auto-injection" to avoid duplicate buttons on themes that partially respect the WooCommerce hooks.

= Can I use Dresium on platforms other than WooCommerce? =

Yes, Dresium is available as an official Shopify app: https://apps.shopify.com/dresium. For other e-commerce platforms (BigCommerce, Magento, custom systems) a universal JavaScript SDK is on the roadmap. Contact support@dresium.com if you want to be notified when it is released.

= Is it compatible with HPOS? =

Yes, Dresium is fully compatible with WooCommerce High-Performance Order Storage (HPOS).

= How are customer photos handled? =

Photos are transmitted over HTTPS to Dresium servers for AI processing. They are not permanently stored unless the customer explicitly saves them. Photos are never shared with third parties or used for AI training. See the Data Processing Agreement for full details.

= Is it GDPR compliant? =

Yes. Before the Try-On button is exposed to customers, you must sign a Data Processing Agreement inside the Legal tab (GDPR Article 28). If the DPA is not signed, the button stays invisible on the storefront and no data is transmitted. Customers can request deletion of their photos at any time.

= How does the attribution work? =

When a customer generates a try-on and purchases the same product within 7 days, the sale is attributed to Dresium in the Analytics dashboard. Refunds within the same window are subtracted from attributed revenue. Guest purchases (no customer_id) are not attributed.

== Screenshots ==

1. Dresium admin home — overview of your AI virtual try-on with key metrics and quick actions.
2. Analytics — try-ons, purchases, conversion rate and revenue attributed to the virtual try-on, with 7/30/90-day filters.
3. Main settings — general configuration of the Dresium virtual try-on plugin.
4. Product Page — the “Try This On” button is visible to guest users (unregistered users) on the product page.
5. Step 1 — in this step, you can upload your photo.
6. Step 2 — in this step, you can proceed with the try-on by confirming the photo you provided to the e-commerce site.
7. Step 3 — in this step, you can view and share the try-on results.

== Changelog ==

= 3.4.18 =

* **Fixed: the try-on button could silently fail on sites with aggressive full-page caching, falling back to the login prompt even for logged-out visitors who were supposed to use guest mode** — storefronts behind WP Rocket, LiteSpeed Cache, Cloudflare APO, SG Optimizer or similar page caches served the same cached HTML to every guest visitor, including the embedded WordPress REST nonce. Once that cached nonce became older than the WordPress 24-hour nonce window, every subsequent try-on request returned 403 `rest_cookie_invalid_nonce` and the widget degraded to the "please log in" screen with no actionable error for the shopper. The authentication of storefront REST calls has been reworked to use a time-based HMAC token (`X-Dresium-Token`) that stays valid regardless of how long the HTML sits in a page cache. The legacy nonce header is kept as a fallback so visitors who load an older cached HTML (served by browser cache from a previous version) continue to work during the rollout.

= 3.4.17 =

* **Fixed: Dresium logo in the guest wizard and event-preset modal was rounded when the merchant set a custom border radius** — the override that preserves the logo rectangular shape previously covered only the main, loading and result modals. The guest wizard logo (shown to shoppers who are not logged in) and the event-preset modal logo were missing from the exclusion list and inherited the merchant's custom corner radius, visibly distorting the Dresium branding. Both are now explicitly included in the exclusion rule.

= 3.4.16 =

* **Documentation: added explicit price per generation (€0.10) in both the Pricing section and the FAQ** — merchants can now see the current cost (10 credits × €0.01 per credit = €0.10 per try-on) directly on the WordPress.org listing without having to install and open the Billing tab. The disclaimer that pricing is dynamic and that the Billing tab always shows the live value before top-up is preserved.

= 3.4.15 =

* **Fixed: 41 admin strings were showing in English regardless of the WordPress locale** — several merchant-facing strings in the Dresium settings (Billing/currency notice, Low-balance email reminder section, Categories page explanatory text, Advanced tab "Shadow DOM" and "JS fallback for page builders" descriptions, "Reactivation needed" notices, "Font preview is approximate" warning) were present in the source code but missing from the translation files. All six locales (Italian, French, German, Spanish, English US and GB) now have the complete translations.
* **Changed: internationalized the "Font preview is approximate" warning** — the warning on the Appearance tab was previously hard-coded in Italian, so merchants on non-Italian stores saw Italian text. The source has been translated to English and the Italian translation moved to the PO file.

= 3.4.14 =

* **Removed: legacy B2B onboarding form** (`admin.php?page=dresium-b2b-onboarding`) — the pre-v3.4.0 manual onboarding form has been removed. The sole onboarding flow from now on is the "Claim 1,000 free credits" button in the Dresium admin home (added in v3.4.0), which registers the merchant AND grants the welcome bonus in a single click. Having both flows was confusing: merchants who used the legacy form got a 0-credit account and often didn't realize they also needed to click Claim to receive the bonus. The two "Complete onboarding" / "Complete setup" buttons in the Statistics page and in Dresium > Settings tabs now redirect to the plugin home where the Claim button lives.

= 3.4.13 =

* **Fixed: WordPress.org readme compliance** — removed the `easyadv` entry from the Contributors header because it is not a valid WordPress.org username (import warning), and shortened the Short Description from 196 to 136 characters to stay within the 150-character limit required by the plugin directory.

= 3.4.12 =

* **Changed: FAQ updated — Shopify app is now live, no longer "coming soon"** — the FAQ answer "Can I use Dresium on platforms other than WooCommerce?" previously said the Shopify app was coming soon. The Dresium Shopify app is now officially published on the Shopify App Store (https://apps.shopify.com/dresium), and the FAQ has been updated accordingly.

= 3.4.11 =

* **Fixed: residual camera icon and "No photos uploaded" text during the first photo upload** — follow-up to 3.4.10. The two "Upload your first photo" / "Or take a selfie" buttons were hidden during the upload procedure, but the camera icon and the "No photos uploaded" text in the same container were still visible on top of the grid loading the newly uploaded photo. Now the entire empty-state block (icon + text + buttons) is hidden together while the upload is in progress.

= 3.4.10 =

* **Fixed: no more flash of the empty-state buttons when confirming the crop of the first photo** — follow-up to the fix in 3.4.9. The "Upload your first photo" and "Or take a selfie" buttons are now hidden as soon as the user clicks either one of them, stay hidden through the crop step, and are restored only if the user cancels the procedure (closing the file picker without choosing a file, closing the crop modal with the X / backdrop / Cancel, denying webcam access, or canceling the webcam dialog). This eliminates the brief visual flicker between crop-confirm and the newly uploaded photo tile appearing in the grid.
* Internal: CropModal.open now accepts a third argument `onCancel` that fires when the user closes the crop modal without confirming. Previously there was no way to tell apart "crop confirmed" from "crop cancelled" at the call site.

= 3.4.9 =

* **Fixed: hover feedback restored on the empty-state photo upload buttons** — the "Upload your first photo" and "Or take a selfie" buttons in the empty Photos tab had an override that forced their background to stay white on hover, making them look non-interactive. They now use the standard secondary-button hover (`#f9fafb`) consistent with the rest of the Try-On UI.
* **Fixed: flash of empty-state buttons after cropping and confirming the first photo** — after confirming the crop of the first uploaded photo, there was a brief visual flicker where the "Upload your first photo" and "Or take a selfie" buttons appeared alongside the newly uploaded photo tile. The empty-state container is now hidden immediately when the photo grid starts loading, so the user never sees the old empty UI during the reload.

= 3.4.8 =

* **Improved: clearer feedback when a photo is already the default** — in the Setting modal, after a customer uploads their first photo (which is auto-selected as the default), the "Select this photo" button becomes disabled with no explanation, leaving the user wondering what to do. The button label now switches to "Photo selected" (localized in IT/EN/FR/DE/ES) whenever it is disabled, making the state obvious. When another photo is clicked, the label switches back to the original "Select this photo" and the button becomes clickable again.

= 3.4.7 =

* **Fixed: Try-On modals now actually get localized when Shadow DOM isolation is enabled** — this was the root cause of all residual Italian strings reported on non-Italian storefronts. When Shadow DOM CSS isolation is enabled (available since 3.0.14, now the default on new installs since 3.4.1), the Try-On dialog markup is moved from the light DOM into the `<dresium-tryon-app>` custom element's Shadow DOM. The `hydrateI18n()` function used `document.querySelectorAll('[data-i18n]')` which does NOT traverse Shadow DOM, so every `data-i18n` element inside the dialog markup (161 elements per the test instance — size modal title, setting sidebar labels, step headers, all buttons, etc.) kept the fallback Italian text from the PHP template regardless of the browser locale. `hydrateI18n()` now explicitly recurses into every `shadowRoot` under the scope. All i18n-eligible elements are now properly translated at page load.

= 3.4.6 =

* **Fixed: Try-On storefront UI now ALWAYS follows the browser language, not the store language** — previous versions prioritized the WordPress site locale (set by the merchant) over the shopper's browser locale on WooCommerce, so a shopper with an English browser visiting an Italian store would see Italian strings in the Try-On widget (e.g. "Qual è la tua taglia?" instead of "What's your size?"). The locale picker is now `navigator.language → navigator.languages[] → data-locale → html[lang]` on both WooCommerce and Shopify, matching the original design intent and the behavior shoppers expect. The site locale remains as a secondary fallback only if the shopper's browser language is not one of the five supported languages (IT/EN/FR/DE/ES).
* Internal: both `pickI18nDict()` (UI strings) and `pickLang()` (curiosities language) now share the same browser-first priority order.

= 3.4.5 =

* **Fixed: "Sign in to continue" overlay now localized** — the overlay shown to guest shoppers who open the Try-On settings/gallery (title, description and "Sign in" button) was hardcoded in Italian regardless of the browser locale. Now fully localized in IT/EN/FR/DE/ES.
* **Fixed: fullscreen gallery arrow buttons now read correctly in screen readers** — the "Previous" / "Next" ARIA labels on the zoom modal navigation were set to Italian at creation time and only replaced on page load (not when the buttons were newly created). Now set to the user's browser language from the start.
* **Fixed: "My Dresium look" share title and "Copy the link" prompt now localized** — the title passed to the native Web Share API and the fallback copy-link prompt were in Italian. Now in the user's language.
* **Fixed: "Checking…" transient tooltip on the Animate button** — brief tooltip during eligibility check was in Italian. Now localized.
* **Fixed: "Generated outfit" alt text on gallery tiles** — now follows the browser language instead of being hardcoded in English, improving screen-reader experience for non-English shoppers.

= 3.4.4 =

* **Fixed: more residual Italian strings localized** — follow-up to 3.4.3. Fixed the video badges in the gallery ("Generate video", "Generating...", "Play video", "Stop video") that remained in Italian regardless of the browser locale, the "Saved" confirmation on Setting dropdowns, and the "Preset occasion" / "Close" ARIA labels in several modals that lacked a client-side translation attribute. All strings are now covered in IT/EN/FR/DE/ES.

= 3.4.3 =

* **Fixed: storefront UI no longer shows a mix of languages** — several hard-coded Italian strings in the gallery and share flows (button titles "Delete / View / Share / Open fullscreen", "Error: ...", "Network error", Instagram share instructions) were previously shown in Italian regardless of the browser language. These strings are now fully localized in all 5 supported languages (IT/EN/FR/DE/ES).
* **Fixed: race condition in client-side locale detection** — if the i18n bundle wasn't yet loaded when the first translation lookup happened, the detector cached an empty dictionary and every subsequent string fell back to the hard-coded fallback (always Italian) for the rest of the session. The cache now only stores a non-empty dictionary.
* **Fixed: automatic English fallback when a key is missing** — if a translation key is missing from the user's locale (e.g. French), the lookup now falls back to English before falling back to the hard-coded Italian fallback in the source. Previously French/German/Spanish shoppers would see occasional Italian strings scattered through the UI.
* **Added: missing "common.*" translation keys** — delete, view, share, fullscreen, error, unknown, networkError, networkErrorReload, share.instagramTitle, share.instagramInstructions — in all 5 languages.

= 3.4.2 =

* **Fixed: Try-On button now appears out of the box after activation** — on fresh installs with the default category configuration, clicking "Activate the Try-On button" now immediately shows the button on all product pages, without requiring manual category selection. Previously the storefront kept the button hidden until at least one category was explicitly saved.
* **Fixed: your Style preferences are now reflected everywhere automatically** — the preferences you set in Settings > Style (scene, action, time of day, weather, expression, framing) are now pre-populated in the Try-On wizard's "Personalize scene" step without requiring a Save click first. Changes auto-save on every dropdown change (debounced), synced to both your local browser and your server account.
* **Fixed: "Claim 1,000 free credits" flow no longer loops after a server-side reset** — an edge case where clicking the claim button could ping-pong between "already claimed" and "please claim" has been resolved. The claim rate limit was also relaxed from 1/5min to 5/5min per IP to accommodate normal retries.
* **Changed: legal setup is now a soft, dismissible reminder** — the Legal tab banner no longer says "try-on generation is blocked"; it now explains that signing Privacy, DPA and Terms is optional but recommended for GDPR compliance. The reminder is shown as a dismissible card on the Dresium admin home (not as a WordPress admin notice) and can be hidden for 30 days.
* **Changed: Categories tab shows the current state clearly** — the Categories tab now displays an info banner explaining "Try-On is shown on all categories by default" with all categories pre-selected. Uncheck specific categories and save to limit the Try-On button to a subset.
* **Added: "Reactivation needed" banner on the Settings tabs** — if your Dresium account was reset or deleted server-side, the Settings tabs now show a clear path back to the Dashboard with a one-click reactivation CTA, instead of raw "Cannot load..." error messages.
* **Improved: Try-On activation card UI** — removed the 720px max-width constraint so the activation card uses the full admin width on wide screens. Fixed button overflow and the loss of rounded corners on focus/active states; buttons no longer inherit WordPress admin's default button border.
* **Improved: copy on the free-credits CTA** — reworded for clarity ("no financial commitment, no card required") and expanded to a short narrative pitch instead of a terse button label.
* **Improved: full translations in all 6 locales** — Italian, English (US / GB), French, German and Spanish retranslated for all v3.4.x strings (legal tab, activation card, reactivation banner, info banners, Settings style preferences).
* Internal: diagnostic endpoint `opcache-reset.php` (admin-only) added for troubleshooting merchant HMAC state on live servers where WP-CLI is unavailable. Reverted a shadow-DOM CSS bundle change that caused a regression in a subset of themes; v3.4.1 shadow-DOM behavior is restored. A developer-only "Reset locale" button is also available in the admin home when `DRESIUM_DEV_MODE` is defined in `wp-config.php`.

= 3.4.1 =

* **Added: "Dashboard" quick link in the Plugins list** — a direct shortcut to the Dresium admin landing right from the "Installed plugins" row, next to Settings and Deactivate.
* **Added: one-click Try-On activation on your product pages** — a dedicated card on the Dresium admin page lets you turn on the Try-On button on your WooCommerce products with a single click. Works on both classic WooCommerce templates and modern block themes (Gutenberg / Full Site Editing). You can disable the automatic placement in one click if you prefer the shortcode or Gutenberg block.
* **Changed: automatic Try-On button is now OFF by default on new installs** — nothing appears on your storefront until you explicitly activate it. Existing installs keep their current behavior unchanged.
* **Changed: readme highlights the 1,000 free credits** — the plugin page on WordPress.org now makes clear that the full plugin is testable for free with 1,000 welcome credits.

= 3.4.0 =

* **Added: 1,000 free credits to try the plugin** — the first time you open the Dresium admin page, a welcome box offers 1,000 free credits with a single click. Credits are added immediately, no payment or billing setup required. They are consumed only when a shopper actually generates a virtual try-on on your storefront.
* **Added: video tutorial in the admin landing** — a 2-minute embedded walkthrough shows exactly what shoppers experience and how to configure the plugin.
* **Changed: legal acceptance is now optional** — the "Privacy / DPA / Terms" banner is no longer blocking. Try-On works out of the box; signing the GDPR legal pack is a one-click reminder you can dismiss for 30 days from the Dresium admin page. This mirrors how our Shopify app behaves, removes friction for new installs, and leaves the data-controller responsibility with the merchant.
* **Changed: no more forced onboarding redirect** — opening WooCommerce → Settings → Dresium no longer forces a redirect to a mandatory onboarding form. The merchant account is created automatically the first time you claim the 1,000 free credits.
* **Changed: storefront no longer hidden when legal is unsigned** — the Try-On button now appears on your product pages even if you haven't signed Privacy/DPA/Terms yet.
* Internal: client support for the new /woocommerce/claim-free-credits endpoint.

= 3.3.1 =

* **Fixed: event presets now consistently generate the matching scene** — tapping "First date", "Fashion show", "Job interview" or "Wedding" sometimes produced an unrelated background (e.g. a fashion-show preset generated a beach scene) because any saved Style defaults (scene/time/weather/action) could compete with the event preset at generation time. The event preset now always wins over saved custom scene fields; if no event preset is selected, saved defaults keep working exactly as before.

= 3.3.0 =

* **Added: body-shape picker before each try-on** — shoppers choose an approximate size (XS to XXL) with a visual silhouette before generating. This hint helps the AI render body proportions more accurately. Visually a 2×3 grid of silhouette thumbnails; one tap and continue. The chosen size is remembered in the browser for subsequent try-ons but can be changed any time. **Does not change which product variant goes into the cart** — that's still the variant selected on the product page.
* **Removed: redundant "Build" dropdown from Custom Scene and Guest wizard** — the new body-shape step replaces it. The Style settings page keeps a default build selector for logged-in customers who want to set a profile-wide preference.

= 3.2.3 =

* **Fixed: SVG icons clipped when the merchant used a custom radius** — the cascade that applies the merchant-configured corner radius to modal elements was also rounding/clipping the icon SVGs inside modals (close × , back arrows, download, play, share, chevrons, check marks). Re-applied the targeted neutralization rule (border-radius 0 + overflow visible + no mask/clip) on all `<svg>` descendants of Dresium dialogs. The fix was in place in a previous version but was lost during a modal split refactor.

= 3.2.2 =

* **Added: visual feedback on the Add-to-cart button** — after a successful click the button animates from brand purple to green with a check-mark icon, confirming the item was added. No toast, no popup — zero friction UX.

= 3.2.1 =

* **Fixed: Add-to-cart from the try-on result modal didn't actually add items** — WooCommerce initializes the cart/session only during standard page requests, not during REST API calls, so the backend add silently failed. The endpoint now bootstraps WC session + customer + cart handlers before adding, and explicitly persists the cart cookie after the add. Both guest and logged-in sessions work.

= 3.2.0 =

* **Added: Add-to-cart button in the try-on result modal** — after a successful virtual try-on, shoppers can add the product to their cart in one click without leaving the result modal. The size and any variant currently selected on the product page (or the first available variant if none selected) is used automatically — no size picker, no interruption. Mini-cart badge refreshes via standard WooCommerce fragments; works on all WC-compliant themes.

= 3.1.0 =

* **Added: low-balance email reminder** — enable optional email alerts in WooCommerce > Settings > Dresium > Billing. When your credit balance drops below your chosen threshold, Dresium sends a reminder to your contact email (at most once per day while the balance stays low). Email language follows your WordPress admin language, with English fallback. Delivered from info@dresium.com via your site's existing SMTP setup.

= 3.0.16 =

* **Fixed: misleading error message when the store runs out of credits** — the storefront previously showed "Oops! The service is being updated. Please try again in a few minutes." for a 402 insufficient-balance response. It now correctly says "The store has run out of credits. Please try again later." in all 5 supported languages (IT/EN/FR/DE/ES).
* **Fixed: generic daily rate limit fell back to Italian in all languages** — the i18n key for the generic 429 message was missing from the storefront bundle, so non-Italian shoppers saw the Italian fallback. Added `main.rateLimit` localization in IT/EN/FR/DE/ES.
* **Fixed: AI service unavailable (503) showed raw backend text** — when the AI pipeline is temporarily down, the storefront now shows a dedicated localized message ("The service is temporarily unavailable. Please try again in a few minutes.") instead of a raw Italian server message. Both guest and logged-in flows are covered.

= 3.0.15 =

* **Fixed: crop modal could accidentally close during drag** — when a crop drag ended outside the image area, the modal treated it as a backdrop click and closed, cancelling the operation. It now closes only on a real click on the modal backdrop.
* **Added: take a selfie on the spot when logged in** — previously only guest visitors had this shortcut. On mobile it opens the front camera directly; on desktop it opens a webcam capture dialog. The existing "upload from device" path is unchanged.

= 3.0.14 =

* **Shadow DOM CSS isolation** — try-on modals are now fully isolated from your theme's CSS. Enabled by default on fresh installs, disabled by default on existing installs (opt-in from WooCommerce > Dresium > Advanced, to avoid any visual change without your consent). Solves cross-theme conflicts on themes with aggressive CSS resets (Kadence, Astra, Divi, Bricks, and themes based on normalize.css / html5boilerplate). Includes a JavaScript fallback for page builders that skip WooCommerce hooks (Elementor Pro Product Templates, Divi Theme Builder, Bricks Builder).
* **Product category picker** — the Advanced tab now shows product categories as a nested tree with strict parent-child logic: enabling a subcategory requires its parent to be enabled too. Much clearer to configure than the previous flat list.
* **Fullscreen gallery: video first** — when a product image has an associated video, the fullscreen gallery now opens directly on the video instead of the static image.
* Minor bug fixes.

= 3.0.13 =

Critical fix: theme compatibility. Some WordPress themes (with CSS resets inherited from normalize.css / html5boilerplate) applied `dialog { display: block }`, which overrode the browser default `dialog:not([open]) { display: none }` and caused all Dresium try-on modals to appear as visible blocks at the bottom of product pages when closed. Fixed by restoring the browser default via a targeted rule on Dresium dialogs only.

= 3.0.12 =

Minor bug fixes

= 3.0.11 =

Minor bug fixes

= 3.0.10 =

Minor bug fixes

= 3.0.9 =

Minor bug fixes

= 3.0.8 =

Minor bug fixes

= 3.0.7 =

Post-3.0.3 refinement release. Consolidates fixes and UX improvements from 3.0.4 → 3.0.7 development iterations. Backwards compatible with 3.0.3 — no data migration, no re-onboarding required.

**Admin UX — Appearance tab**

* Live preview on the Preview button and on the Button Size tiles (small/medium/large) now reflects **all** style changes in real time: palette, custom colors, uppercase, show-icon, CTA text, border radius and font family — previously radius and font were applied silently only after saving.
* Border radius is applied live to the Preview button and the Button Size tiles via JavaScript listeners on the slider and the number input.
* Font family is applied live to the Preview button and the Button Size tiles by loading the 12 Google Fonts of the whitelist (Inter, Poppins, Montserrat, Roboto, Open Sans, Lato, Raleway, Nunito, Playfair Display, Merriweather, Lora, DM Sans) directly in the admin page via `<link rel="stylesheet">` output in `output_section_appearance()` (bypassing `wp_enqueue_style` which could HTML-escape the `&` characters in the CSS2 URL bundle).
* Font application uses `document.fonts.ready` to re-sync the preview once the Google Fonts WOFF2 files are actually downloaded, avoiding the initial pageload flashing with the system font.
* Fallback family per-font-category (serif vs sans-serif) so if a Google Fonts file fails to load, the preview at least maintains the correct typography category.
* Added a yellow disclaimer under the Typography section informing merchants that the font preview is approximate and that the accurate rendering can be verified only by saving and opening a product page in a new tab.

**Admin UX — Financials tab (B2B Pricing Configuration)**

* Introduced a new pricing input model with 4 primary fields (image total cost in €, credits per image, video total cost in €, credits per video). The credit price is derived automatically from the image_price / image_credits ratio.
* All fields accept EUR values with 2-decimal precision (0.01 step). Backend stores in cents (integer) with `round(eur * 100)`. Retrocompatibility layer accepts legacy `*_cents` POST parameters.
* Live preview info box (blue) shows internal derived credit price, example €100 top-up conversion in credits and video intrinsic value with warning if declared video cost diverges from the intrinsic value.
* New backend getters `Dresium_Merchant_Balance::get_image_price_cents()` and `get_video_price_cents()` return the costs saved directly by the admin — no more derivation via `credit_price × credits` which caused rounding-to-integer-cents artifacts (`€0.30 / 20 credits → €0.015` was rounded to `€0.02` making `€0.30` incorrectly rendered as `€0.40` after save).
* The endpoint `/merchants/self` and `/pricing/current` now expose `image_price_cents` and `video_price_cents` as the source of truth. Frontend (Shopify Remix admin, storefront extension, WooCommerce client plugin) consume these instead of recomputing from credit price. Fallback to legacy calculation for merchants pre-3.0.7 without the new options stored.
* Stripe checkout now uses float precision for credit calculation: `credits = floor(topup_cents / (image_price_cents / image_credits))` instead of `intdiv(topup_cents, credit_price_cents)`. Fixes an issue where a €100 top-up produced 5000 credits instead of the expected 6666 (with €0.30/20 credits config).
* Hint box in the B2B Pricing Configuration section with concrete example configuration and derived calculations to help merchants understand the credit model.

**Storefront — theme compatibility**

* Fixed the fullscreen zoom modal close button (X icon) being invisible on Astra theme. Astra's default button rule applies `padding: 15px 30px !important-equivalent` and `font-size: 16px` to any `button` element, overriding the Dresium close button's fixed 40×40 sizing and squishing the SVG X.
* Fix: theme-guard now applies explicit `width: 48px`, `height: 48px`, `padding: 0`, `font-size: 0` and `line-height: 1` with `!important` to `#dresium-tryon-zoom-modal .dresium-zoom-modal__close`. The inner SVG has explicit `width/height: 24px` and `color: #ffffff` with `!important`.

**Compatibility**

* No breaking changes. All previously stored merchant balances, subscriptions and auto-topup configurations continue to work unchanged.
* Zero-config upgrade: existing pricing configuration (10 credits per image, 40 credits per video, €0.10 per credit, €10 minimum recharge, €100 whitelabel threshold) is preserved. Merchants can adopt the new 4-input pricing model at any time from Financials tab.

= Older releases (<= 3.0.3) =

The full changelog for releases 3.0.3 and earlier (including the 3.0 beta/alpha cycle and the pre-B2B 2.x history) is available on GitHub: https://github.com/DresiumAI/dresium/blob/44aa616b/client/wp/wp-content/plugins/dresium/readme.txt

== Upgrade Notice ==

= 3.4.18 =
Important compatibility fix for stores using page cache plugins (WP Rocket, LiteSpeed Cache, Cloudflare APO, SG Optimizer). Guest shoppers were sometimes shown the "please log in" screen instead of the try-on wizard because the cached HTML contained an expired WordPress REST nonce. The widget now uses an HMAC token that is cache-safe. Strongly recommended if your product pages are cached.

= 3.4.17 =
Visual fix for stores that set a large custom corner radius: the Dresium logo in the guest wizard and event-preset modal is no longer rounded. Recommended if you configured a border radius in Dresium > Appearance.

= 3.4.16 =
Readme-only update: the Pricing section and the "How much does a try-on cost?" FAQ now show the concrete current price of €0.10 per try-on (10 credits × €0.01 per credit). No functional changes.

= 3.4.15 =
Translation coverage: 41 merchant-facing admin strings (Billing notices, Low-balance reminder, Categories explanations, Advanced tab Shadow DOM / JS fallback descriptions, reactivation banners) that were previously stuck in English are now properly translated in Italian, French, German, Spanish, English US and GB.

= 3.4.14 =
Simplified onboarding: removed the legacy B2B setup form in favor of the single "Claim 1,000 free credits" button added in v3.4.0. One click now registers your store and credits your account at the same time, eliminating the previous confusion where some merchants ended up with 0-credit accounts after using the old form.

= 3.4.13 =
Metadata-only fix: readme.txt Contributors header and Short Description adjusted to comply with WordPress.org plugin directory requirements (removed invalid contributor username, trimmed short description under the 150-char cap). No functional changes.

= 3.4.12 =
Documentation update: FAQ corrected to reflect that the Dresium Shopify app is now officially available on the Shopify App Store (previously labeled "coming soon").

= 3.4.11 =
Tiny polish follow-up to 3.4.10: the camera icon and the "No photos uploaded" text are now hidden together with the upload buttons during the first photo upload (previously they lingered visibly over the loading grid).

= 3.4.10 =
Follow-up UX polish on the Settings > Photos tab: the "Upload your first photo" and "Or take a selfie" buttons now disappear immediately when clicked and reappear only if the upload procedure is actually cancelled. No more flicker between crop-confirm and the new photo appearing in the grid.

= 3.4.9 =
Two small UX fixes in the Settings > Photos tab: hover feedback restored on the "Upload your first photo" and "Or take a selfie" buttons (they previously looked non-interactive), and the brief flicker of those buttons after cropping the first uploaded photo is now gone.

= 3.4.8 =
Small UX improvement in the Settings > Photos tab: after uploading the first photo (which is auto-selected as default), the previously-confusing disabled "Select this photo" button now reads "Photo selected" so customers understand the state. Localized in IT/EN/FR/DE/ES.

= 3.4.7 =
Critical fix for Shadow DOM-enabled installs (default on new installs since 3.4.1): the Try-On dialogs were never actually translated because the i18n hydrator did not traverse Shadow DOM. This fixes the vast majority of residual Italian strings seen on non-Italian storefronts. Mandatory upgrade for everyone on 3.0.14+ who has Shadow DOM isolation enabled.

= 3.4.6 =
Critical fix: the Try-On widget now follows the shopper's browser language instead of the merchant's WordPress site language. Previously, a shopper with an English browser visiting an Italian store would see Italian in the Try-On widget. Mandatory for merchants with international shoppers.

= 3.4.5 =
Last residual Italian strings removed from the storefront Try-On UI: "Sign in to continue" overlay (guest shoppers), fullscreen gallery nav ARIA labels (screen reader), Web Share API title, and "Checking…" / "Copy the link" fallbacks. The frontend is now fully localized in IT/EN/FR/DE/ES on both WooCommerce and Shopify.

= 3.4.4 =
Follow-up to 3.4.3: additional residual Italian strings localized across the storefront Try-On UI — video gallery badges (Generate / Generating / Play / Stop video), "Saved" confirmation on Setting forms, and ARIA labels for size/event-preset/guest modals. Recommended for everyone, especially stores with non-Italian shoppers.

= 3.4.3 =
Critical fix for multilingual stores: the storefront Try-On UI no longer shows a mix of Italian and the shopper's browser language. Fixes gallery button titles (Delete / View / Share / Open fullscreen), error messages, Instagram share text and the race condition that could leave the entire UI in Italian regardless of browser locale. Recommended for everyone, especially stores with non-Italian shoppers.

= 3.4.2 =
UX fixes recommended for everyone on 3.4.0 or 3.4.1: Try-On button now appears correctly on all products out of the box after activation; your Settings > Style preferences propagate automatically to the Try-On wizard with auto-save on change; legal reminder reworded as optional; new "Reactivation needed" guidance; relaxed rate limit on the claim-free-credits endpoint. Full re-translation in IT/EN/FR/DE/ES.

= 3.4.1 =
Dashboard shortcut in the Plugins list, one-click Try-On activation on product pages (classic + block themes), and auto-injection now OFF by default on new installs. Readme updated to highlight the 1,000 free credits. Recommended for everyone.

= 3.4.0 =
Major UX changes: 1,000 free credits with a single click, embedded video tutorial, and legal acceptance made optional (one-click dismissible reminder instead of a blocking banner). Try-On works on your storefront out of the box. Recommended for everyone.

= 3.3.1 =
Fixes a bug introduced before 3.3.0 where saved Style defaults could override a chosen event preset at generation time (e.g. "First date" sometimes producing a beach or fashion-show scene). Event presets now reliably win over saved custom scenes. Recommended for everyone using event presets.

= 3.3.0 =
New: a one-tap body-shape picker (XS–XXL) runs before every try-on to give the AI a better hint about proportions. Visual silhouettes, no form fatigue. Does not affect cart variant selection.

= 3.2.3 =
Visual fix for stores that configured a custom corner radius: modal icons (close, back, download, play, share, …) were being rounded/clipped by the cascade. Recommended for everyone on 3.2.0+ who customized the Dresium radius from the Appearance settings.

= 3.2.2 =
Minor polish: visual green-check feedback on the Add-to-cart button after a successful click. No functional changes.

= 3.2.1 =
Critical fix for the Add-to-cart feature added in 3.2.0: items are now actually persisted in the cart (previously the REST endpoint bootstrapped the add in memory but WC never saved the session). Recommended for everyone running 3.2.0.

= 3.2.0 =
New: one-click Add-to-cart from the try-on result modal. After trying a product on virtually, your shopper can add it to the cart without leaving the result view. Uses the variant currently selected on the product page (or first available if none). Works on all WC-compliant themes.

= 3.1.0 =
New: optional low-balance email reminder. Enable it from WooCommerce > Settings > Dresium > Billing and get a daily email at your contact address when your credit balance drops below the threshold you set — in your WordPress admin language. Recommended if you don't use auto-topup.

= 3.0.16 =
Error-message polish: shoppers now see clear, localized messages when the store runs out of credits (previously mislabelled as "service being updated"), when they hit the daily rate limit in non-Italian locales (previously fell back to Italian), and when the AI service is temporarily unavailable. All 5 languages (IT/EN/FR/DE/ES). Recommended for all merchants.

= 3.0.15 =
Fixes a blocking issue with the crop modal that could close accidentally when a drag ended outside the image area, and adds camera capture for logged-in customers (front camera on mobile, webcam on desktop) — matching what was already available for guest visitors. Recommended for all merchants.

= 3.0.14 =
Feature release: Shadow DOM CSS isolation to prevent theme conflicts on try-on modals (enabled by default on fresh installs, opt-in from Advanced tab on existing installs — no visual change without your consent), nested tree picker for product categories with strict parent-child logic, and fullscreen gallery now opens directly on the product video when available. Recommended for all merchants, especially on themes with aggressive CSS resets (Kadence, Astra, Divi, Bricks).

= 3.0.13 =
Critical theme compatibility fix. If your theme's CSS applies `dialog { display: block }` (common in themes using older normalize.css / html5boilerplate resets), previous versions showed all Dresium try-on modals as visible blocks at the bottom of product pages. This release restores the browser default only for Dresium dialogs, leaving other page dialogs untouched. Recommended for all merchants.

= 3.0.7 =
Refinement release: live preview for radius and font in the Appearance tab, new 4-input B2B pricing model with EUR precision (no more integer-cent rounding), Stripe checkout precision fix (a €100 top-up now correctly yields the expected number of credits based on your actual image price ratio), Astra theme compatibility fix for the fullscreen zoom modal close button. Backwards compatible with 3.0.3.

= 3.0.0 =
First stable release of the B2B model. Backwards compatible with 3.0.0-beta.1/beta.2 — no re-onboarding, no HMAC key rotation. Ships admin i18n fixes (5 languages fully translated), Appearance/palette persistence fix, storefront radius consistency across all modals, video lazy-load, refreshed guest flow imagery, user-friendly webcam permission dialog, and Brand contact form fix. Users on 2.x must read the 3.0.0-beta.1 upgrade notes: the business model has changed to B2B.

= 3.0.0-beta.1 =
BREAKING CHANGE. Business model switched from B2C to B2B: you pay, customers use for free. Customer OIDC/Keycloak signup, in-plugin Stripe checkout, per-user credit balance and trial packs are removed. If you were running 2.x in production, stay on the 2.1.0 tag and plan the migration: after upgrading to 3.x you must complete the new B2B onboarding form in WooCommerce > Settings > Dresium and sign the DPA before the Try-On button becomes visible again.

= 2.1.0 =
Feature release: credit purchase is now delegated to dresium.com (no in-plugin Stripe checkout), Gallery has a "this product / all try-ons" scope toggle, translations are actually loaded (bug fix) with new IT/FR/DE/ES coverage plus browser-language detection on the storefront.

= 2.0.1 =
Bug fix release: fixes admin menu visibility, DPA server sync, recovery code functionality, and button positioning.

= 2.0.0 =
Initial public release. Install to enable AI-powered Virtual Try-On for your WooCommerce store.
