AnyTry – AI Virtual Try-On for WooCommerce

Plugin Banner

AnyTry – AI Virtual Try-On for WooCommerce

by Paweł Piórek

Download
Description

AnyTry is an AI-powered virtual try-on system that lets your customers see how they’ll look wearing your products before they buy. The plugin integrates directly with WooCommerce product pages, adding a “Try On” button that uses cutting-edge generative AI.

External services

This plugin connects to the AnyTry API (https://api.anytry.ai) to generate virtual try-on images using generative AI. Using the plugin requires an AnyTry account (a free trial is available from the plugin settings screen).

What the plugin uses the AnyTry API for:

  • Try-On generation — submitting the customer photo together with the product image, following the job’s progress (a real-time stream, with polling as a fallback), cancelling a job when the customer closes the dialog mid-generation so the reserved processing is released, and fetching the finished image. Result images are only ever fetched over HTTPS from api.anytry.ai or an *.anytry.ai subdomain.
  • AI Size Advisor — a size recommendation, requested only when the merchant has enabled the feature and the customer completes the quiz.
  • Account and administration (operator workflow only; never customer-facing) — creating the free-trial account on first activation (admin email, WordPress username and store domain only), sending the activation magic-link email, recovering an existing API key, single sign-on to the AnyTry Portal, validating the configured key, and loading the figures shown on the plugin’s own admin Settings screen.
  • Analytics and conversion attribution — funnel events (button impressions, generation completes, add-to-cart, checkout start, purchases, refunds), an abandon event when the customer closes the window mid-generation, and order attribution. Gated on analytics consent, which is OFF by default on new installs.

The Try-On feature works whether or not analytics is enabled. Enable analytics at WooCommerce AnyTry AI “Send analytics & conversion events”.

What is sent to the AnyTry API:

  • The customer photo uploaded via the Try-On modal (transmitted only when the customer explicitly clicks “Try On”).
  • The product image URL and product identifier from WooCommerce.
  • A random session identifier (no personally identifiable information).
  • WooCommerce order ID and product IDs on order completion — only when analytics consent is enabled.
  • Optional: height, weight, and usual size values the customer enters in the AI Size Advisor quiz.

When the data is sent:

  • Try-On generation: when a customer uploads a photo and clicks “Try On” on a product page.
  • Size Advisor: when a customer completes the AI Size Advisor quiz.
  • Conversion events: when an order containing a tried-on product is placed — only when analytics consent is enabled.

Cookies (server-set, persistent):

  • anytry_session cookie (90 days) — stores the random session ID and the list of product IDs the visitor has tried on, used to attribute orders to try-on sessions for the conversion dashboard. Set only when analytics consent is enabled.
  • anytry_tried cookie (90 days) — stores a fallback list of tried product IDs for cases where anytry_session is unavailable (third-party cookie blockers, REST checkout flows). Set only when analytics consent is enabled.
  • anytry_legal_accepted_v2 cookie (1 year) — remembers that the customer has accepted the Try-On legal/age-consent overlay so they are not asked again on every page. Set ONLY after the customer clicks “Accept” on the legal overlay. Not used for any analytics or attribution.

Persistent browser storage (localStorage):

  • anytry_legal_accepted_v2 — mirror of the consent cookie above, same purpose, same trigger. No analytics or attribution use.
  • anytry_tried — client-side mirror of the anytry_tried cookie value, used when third-party cookies are blocked. Written only when analytics consent is enabled.
  • anytry_tried_products — same purpose as anytry_tried but stored in a structured per-product map; used by the admin Conversions tab to attribute orders to try-on sessions. Written only when analytics consent is enabled.
  • anytry_canonical_session_id — a random sess_* identifier kept across reloads so the API can JOIN a try-on generation event to a later purchase event for conversion attribution. Persisted only when analytics consent is enabled. When consent is off, an ephemeral id is held in memory for the current page only and never written to localStorage.
  • anytry_active_jobs — short-lived registry of in-flight try-on jobs (job IDs + status), used so the floating “still working…” widget can resume after a page reload. Cleared when the job finishes or after 24 hours. Not used for any analytics or attribution.

Ephemeral per-tab storage (sessionStorage):

These are scoped to the current browser tab and discarded the moment the tab closes. They exist purely to keep the Try-On UI responsive during a single visit and are never sent to any server.

  • anytry_before_<jobId> — the photo the customer uploaded, kept so the “before / after” toggle works after a result is generated.
  • anytry_result_<jobId> and anytry_result_image — the generated result image data URL, used so the same result re-renders instantly when the customer reopens the modal in the same tab.
  • anytry_feedback_state — whether the customer already rated 👍 / 👎 the current result.
  • anytry_quiz_user_height, anytry_quiz_user_weight, anytry_quiz_usual_size, anytry_quiz_skipped — Size Advisor quiz answers, kept so the customer doesn’t have to re-enter them while comparing multiple try-ons.
  • anytry_sw_blocks_sse — internal counter the plugin uses to detect a Service Worker that’s blocking real-time updates, so it can transparently fall back to the same-origin SSE proxy on the next try-on.

Persistent browser storage (IndexedDB):

Used as a local image cache to avoid re-downloading the same files. Both stores live entirely in the visitor’s browser, are never sent to any server, and are removed when the customer clears their browser data.

  • anytry_cache object store photos — the most recent uploaded photo, so reopening the modal restores the previous photo selection without a re-pick.
  • anytry_results object store images — the data URL of generated result images keyed by job ID, so revisiting a recently-generated try-on renders instantly.

Analytics consent:

The plugin does NOT send analytics or conversion-attribution events by default. Enable them at WooCommerce AnyTry AI “Send analytics & conversion events”. The Try-On image generation itself works whether or not this is enabled — only the conversion-attribution dashboard in the AnyTry Portal depends on this opt-in.

Optional Google Fonts (default OFF):

By default the plugin uses system-sans typography and makes NO third-party font request — the AnyTry API is the only external service it contacts. An internal anytry_load_google_font option (OFF by default, with no user-facing control) would, if enabled, request the Outfit web font from Google Fonts (https://fonts.googleapis.com) on the storefront and the AnyTry admin Settings page; it stays off in a standard install.

  • Service: Google Fonts (https://fonts.google.com)
  • Data sent: visitor IP and User-Agent (standard HTTP request) at the moment a page that has this option enabled is rendered
  • Terms of Service: https://policies.google.com/terms
  • Privacy Policy: https://policies.google.com/privacy

Uploaded photos are automatically deleted from the AnyTry servers within 5 minutes of processing and are not used to train AI models.

This service is provided by AnyTry. By using the plugin, customers agree to the AnyTry Terms of Service and Privacy Policy:

  • Terms of Service: https://anytry.pl/terms
  • Privacy Policy: https://anytry.pl/privacy

Key Features:

  • Photorealistic Try-On — Uses generative AI to create realistic images of customers wearing your products.
  • Data Privacy — Customer photos are automatically deleted after processing. No biometric data stored. Try-on tracking data stored on orders (session ID, tried-product list, attribution job IDs) is included in WooCommerce’s built-in personal-data Export and Erase tools, so customer data requests cover it.
  • High Performance — Real-time SSE streaming with a polling fallback; doesn’t burden your hosting.
  • Responsive Design — Works perfectly on mobile and desktop devices.
  • Variant Support — Works with simple and variable products (color/size).
  • AI Size Advisor — Size recommendations from a short quiz (height and weight with photo silhouette analysis, or a single “what size do you wear?” question).
  • Eye Advisor — For glasses and sunglasses, AnyTry checks whether the frame width fits the face in the customer’s photo and shows a frame-fit verdict on the try-on result. Runs automatically, no setup.
  • Works across categories — clothing, jewellery, watches, eyewear, shoes and accessories.
  • Multilingual — The shopper widget ships 10 languages (EN, PL, DE, UK, IT, ES, FR, SV, DA, NB); admin settings are English, with translations delivered via WordPress.org language packs.
  • HPOS Compatible — Full support for WooCommerce High-Performance Order Storage.
  • WooCommerce Blocks — Compatible with the new block-based checkout.
  • Multi-Job Navigation — Compare results from multiple try-ons with swipe navigation.

How It Works:

  1. Customer clicks “Try On” on a product page.
  2. They upload a photo of themselves.
  3. AI generates a photorealistic image of them wearing the product.
  4. Optional: AI Size Advisor recommends the best size.

SaaS Model: This plugin connects to the AnyTry API for AI processing. An API key is required (free trial available). See Terms of Service and Privacy Policy.

Configuration

  1. Navigate to WooCommerce > AnyTry AI in the admin panel.
  2. Enter your API key or start a free trial.
  3. Customize the button appearance (color, text, position).
  4. Enable AI Size Advisor (optional).
  5. Ensure your products have featured images set (flat-lay or ghost mannequin photos work best).

Requirements

  • WordPress 6.4 or newer.
  • WooCommerce 5.0 or newer.
  • PHP 7.4+ (recommended: 8.1+).
  • Active internet connection (for API communication).

Source code & build

The plugin ships its full unminified sources — src/js/anytry.js, src/css/anytry.css and src/css/anytry-admin.css — alongside the minified runtime in assets/. The two small admin scripts keep their unminified sources in assets/ next to the minified files. Minification is done with esbuild on Node.js 18+ via the minify_wp.js build script.

Third-party code: assets/js/heic2any.min.js is a prebuilt bundle of heic2any 0.0.4 (MIT) that embeds gifshot (MIT) and libheif (LGPL-3.0-or-later). Full attribution, licence texts and the corresponding-source offer are in THIRD-PARTY-NOTICES.txt in the plugin folder. It converts iPhone HEIC photos to JPEG in the browser, loads only when the customer picks an HEIC file, and can be turned off with the “iPhone HEIC support” toggle in WooCommerce AnyTry AI.

  1. Download the plugin ZIP file.
  2. In WordPress admin, go to Plugins > Add New > Upload Plugin.
  3. Select the file and click Install.
  4. Activate the plugin.
  5. Go to WooCommerce > AnyTry AI to configure your API key.
  1. The try-on result — the customer's own photo, wearing the product, generated by AI. A Before / After toggle sits above it, add-to-cart and save below.

    The try-on result — the customer's own photo, wearing the product, generated by AI. A Before / After toggle sits above it, add-to-cart and save below.

  2. AI Size Advisor — the short quiz runs while the try-on generates, so the size recommendation is ready together with the result.

    AI Size Advisor — the short quiz runs while the try-on generates, so the size recommendation is ready together with the result.

  3. WooCommerce product page — the "Try It On" button in the standard product layout, above Add to cart.

    WooCommerce product page — the "Try It On" button in the standard product layout, above Add to cart.

  4. Admin settings — environment health checks, button visibility, and the Size Advisor / Eye Advisor configuration.

    Admin settings — environment health checks, button visibility, and the Size Advisor / Eye Advisor configuration.

Are customer photos safe?

Yes. Photos are transmitted over encrypted connections, processed by AI, and automatically deleted from the server within 5 minutes. They are not used to train AI models.

How long does a try-on take?

Most try-ons finish in 15–20 seconds. The plugin does not paste the garment onto the photo — it generates an entirely new image with generative AI, which is a genuinely heavy computation. The widget shows a live progress estimate while it works, and the customer can minimise the window and keep browsing; the finished result is picked up as soon as it is ready.

What kind of photos should customers upload?

Best results come from full-body photos with good lighting on a plain background.

Does this plugin store any data locally?

The plugin stores only its WooCommerce configuration options (API key, button style, size advisor mode, etc.) and a small amount of WooCommerce order metadata for conversion attribution. No customer photos and no analytics tables are persisted on the merchant site — all AI processing and analytics are handled by the AnyTry cloud service.

Does this plugin set tracking cookies?

Only when the merchant has enabled analytics consent (default OFF). When enabled, anytry_session and anytry_tried cookies persist for 90 days on visitor browsers — both store a random session ID and a list of product IDs the visitor has tried on, used to attribute purchases to try-on sessions. See the “External services” section for full disclosure.

Is this compatible with HPOS?

Yes. The plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS).

1.0.25

  • Fix (statistics honesty): when a purchase could not be linked to the buyer’s own try-on session, the plugin used to ask the AnyTry service which shopper last tried the product and attached that shopper’s session to the sale. On shops where many customers try the same products, this credited sales to the wrong person’s session and inflated the conversion numbers your dashboard shows. Recovered matches are now recorded without any visitor identity and are labelled as server-side recoveries, so your dashboard can tell hard attribution apart from best-effort matching.
  • Improvement: the buyer’s own try-on session is now saved with the order at checkout. Payment confirmations that arrive server-to-server (for example BLIK, Przelewy24 or other bank callbacks) used to lose that link about one purchase in five; those sales were still counted, but not connected to the try-on that led to them.
  • Improvement: every purchase event now states how it was attributed (buyer’s own browser data, checkout form, or server-side recovery), matching what the PrestaShop plugin has always reported.
  • Fix (statistics honesty): refunds and cancellations are recorded against the order they belong to, and no longer against whoever happened to be signed in when the status changed. Previously, processing a refund from the shop admin could attach that browser’s try-on session to the record; on a few orders it did. Those records now carry the order’s own attribution or none at all.
  • Fix (size question): the plugin now asks WooCommerce which sizes a product is actually sold in, instead of reading the size selector out of your theme’s page. Reading the page failed in two common situations: on category and shop pages, where WooCommerce prints no size selector at all, and in any shop whose size attribute is not literally called “Rozmiar” or “Size” – a German “Grosse” or French “Taille” was invisible to it. In both cases the customer was shown your shop’s entire size range instead of the sizes that product comes in. Since the size the customer picks is what the recommendation is built on, offering a size the product is not sold in produced a confident but wrong suggestion.
  • Fix (size question): on shops whose size attribute has an unusual name, the size advisor did not appear at all on product pages – no message, no error, it was simply absent. It now appears wherever the product genuinely has more than one size. Products that really do come in one size are still not asked about, as before.
  • Fix (size question): starting a try-on from a “related products” or quick-view tile no longer offers the sizes of the product whose page you happen to be on. It offers the sizes of the product you actually clicked.
  • Improvement (size recommendation): the size table sent to the advisor is now matched to the product’s own sizes rather than to your shop-wide setting. If your shop is set to letter sizes while a product is sold in numbers (or the other way round), the advisor is no longer asked to answer in a vocabulary your catalogue does not use, and it can no longer recommend a size that product is not available in.

1.0.24

  • Fix: the numeric size table stopped at 44. Anything above that could not be entered and was never sent to the size advisor, so it could not suggest those sizes. The table now runs 32 to 62, which covers petite and plus-size ranges. It scrolls sideways rather than stretching the settings page, and sizes you leave blank are simply not sent.
  • Fix: size rows you left blank are no longer sent. Previously a table you had opened but not filled in was passed along as a row of zeros, which the advisor treated as real measurements.
  • Fix: if you use the optional Cloudflare address list, a typo in one entry no longer quietly disables the origin check that entry was meant to configure. Shops that never set that list up are unaffected. A rejected entry is now written to the error log, so a mistake is visible instead of silent.
  • Fix (Safari, iPhone and iPad): your photo is now kept correctly while the try-on window is open. On Safari it was never stored at all, which is why re-opening the size question or coming back to a finished try-on could ask you for the photo again. Every browser on iPhone and iPad uses Safari’s engine, so this affected all of them.
  • Fix (Safari, iPhone and iPad): tapping Save now saves the picture even when the share sheet does not open in time. Before, that case tried to open a new tab, which the phone usually blocks – so the tap appeared to do nothing.
  • Housekeeping: removed about 150 lines of error-handling code that nothing in the plugin has ever called, so the download is smaller. No behaviour changes.

1.0.22

  • New: a single switch to pause the Try-On across the whole shop without deleting your API key or losing any other setting. Turn it back on when you are ready.
  • New: test mode — the Try-On becomes visible only to the shop users you list, so you can trial it with your own staff before opening it to customers. Everyone else sees your shop exactly as it looked before the plugin was installed.
  • Note: while test mode is on, conversion tracking records nothing, because ordinary customers never reach the Try-On. Turn test mode off before you start measuring sales.
  • Note: pausing the Try-On stops the plugin from loading anything on your shop pages, but it does not stop conversion tracking. Sales of items a customer tried on before you paused are still recorded, so you keep the data you already paid for.

1.0.21

  • Reliability: the try-on window can no longer end up in a contradictory minimized-yet-open state. Re-showing the window cleared the internal flag but left the minimized marker on the element, so which state won was decided only by stylesheet order — a reorder would have hidden both the window and the floating progress bubble at once, leaving no way back except the Try-On button.
  • Reliability: the background-jobs view no longer dismantles the window (hiding the result, the upload area and the floating bubble) before checking whether it has anything to display, which could leave an empty white window.
  • Reliability: switching from one product to another now always shows the correct product’s size options — or none, when the Size Advisor is turned off — instead of briefly carrying over the previous product’s size choices.
  • Reliability: switching to a different product while a result is still downloading no longer shows the wrong product’s result or freezes the try-on that is still running.
  • Reliability: opening the same store in two browser tabs no longer lets one tab cancel or drop the other tab’s in-progress — and already paid-for — try-on.
  • Reliability: a finished try-on is now picked up correctly after a phone browser tab is briefly frozen in the background and reopened, instead of appearing stuck.
  • Reliability: the Save button, and restoring a saved try-on, no longer hang on browsers where the local image store is slow or blocked to open — the widget now falls back to fetching the result instead of waiting indefinitely.
  • Reliability: a size suggestion that arrives late no longer appears on top of an error screen.
  • Reliability: a finished try-on shown in the multi-item comparison list now becomes clickable on its own, instead of remaining on “loading result…”.
  • Reliability: a temporary network or CDN hiccup while fetching a finished try-on no longer shows a dead error. The widget now retries the same, already-generated result a few times before giving up — it never re-runs or re-charges the try-on. This closes the most common “generated but not shown” case.
  • Diagnostics: clearer error categories (a connection problem is now labelled as such, an unsupported image as an image problem, instead of a generic “unknown”), and error events now include the try-on identifier so a store can see exactly which requests hit a display problem.

1.0.20

  • Maintenance: translations now follow the standard WordPress.org model — the plugin ships English source text, and translations are delivered as community language packs from translate.wordpress.org rather than as catalogs bundled inside the plugin. No change to any feature or behaviour.
  • Compatibility: verified on WordPress 7.0.2 with PHP 7.4 through 8.5.

1.0.19

  • Security: try-on and size requests now require a real, published, try-on-enabled product and no longer accept a caller-supplied product image, preventing use of the paid try-on pipeline outside the intended flow.
  • Security: an anonymous request can no longer change the store-wide streaming-proxy setting, and malformed job tokens are now rejected instead of silently ignored.
  • Privacy: with analytics turned off, the storefront now writes no tracking cookie, local storage, or data-layer event.
  • Privacy: Size Advisor now stays fully disabled on both the storefront and the server when turned off in settings.
  • Privacy: GDPR order-data erasure now reliably removes all AnyTry order data.
  • Privacy: cancellation and refund analytics are now limited to products the shopper actually tried on.
  • Reliability: the page-resume mini widget loads its stylesheet correctly, cancels only its own job when closed, and clears that job’s cached photo and result.
  • Admin: the Data controller example now suggests your own store name.
  • Maintenance: refreshed bundled translations and added third-party licence notices; aligned the main bundle version banner.
  • Compatibility: removed global PHP ini_set() overrides (max_execution_time / default_socket_timeout) that could push a host out of its configured limits — the request timeout is set on the HTTP call itself, and the live-status stream now restores its output settings on shutdown.

1.0.18

  • Reliability: HEIC/HEIF photo uploads no longer emit a PHP notice during image-type detection on the try-on request (the image-info value is now always initialised).
  • Maintenance: internal static-analysis hardening (PHPStan level 5, clean) and minor type-safety cleanups — no change to behaviour.

1.0.17

  • Reliability: made result finalization idempotent so a very slow result download can no longer render twice or double-count a completion.
  • Privacy: swapping to a new photo now clears the previous try-on’s cached result images from the browser immediately (previously cleared only on closing the try-on window).
  • Accuracy: eyewear auto-detection on shop/quick-view cards no longer reads a neighbouring product’s description.
  • Hardening: strip line breaks from the product category before it is sent to the API; apply the same Cloudflare source-IP verification to the conversion-tracking rate limit as the rest of the plugin.

Older entries (1.0.0 – 1.0.16) are kept in the plugin’s source repository and in the release history on wordpress.org.

Back to top