
內容簡介
AnyTry 是一款基於 AI 的虛擬試穿系統,讓顧客在購買前可以看到穿上產品的效果。此外掛直接整合至 WooCommerce 商品頁,新增「試穿」按鈕,利用尖端的生成式 AI 技術。
【主要功能】
• AI 驅動的虛擬試穿功能
• 與 WooCommerce 無縫整合
• 提供即時生成的試穿圖像
• 支援顧客上傳照片
• 提供尺寸建議功能
外掛標籤
開發者團隊
② 後台搜尋「AnyTry – AI Virtual Try-On for WooCommerce」→ 直接安裝(推薦)
原文外掛簡介
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).
Endpoints used at api.anytry.ai:
Service endpoints (the Try-On feature itself; all reachable without analytics opt-in):
POST /anytry — submit a virtual try-on job (customer photo + product image, multipart upload).
GET /status/
GET /status/stream/
POST /cancel/
GET
POST /analyze/size — AI Size Advisor recommendation (only when the merchant has enabled the Size Advisor feature and the customer completes the quiz).
POST /gpu/warmup — wake up the GPU pool when the customer opens the Try-On modal. No body; optional tracking token only. Reduces first-generation latency.
Admin-side service endpoints (operator workflow only; not customer-facing):
POST /tenant/trial — create a free-trial account on first plugin activation (admin email + WP username + store domain only).
POST /auth/register-magic-link — send the activation magic-link email to the operator.
POST /auth/get-key-by-email — recover the API key for an existing account.
POST /auth/portal-token — single-sign-on to the AnyTry Portal from the admin Settings page.
GET /account/status — validate the configured API key.
GET /analytics?days=
Analytics + conversion-attribution endpoints (gated on analytics consent — default OFF on new installs):
POST /api/track-event — funnel events (button impressions, generation completes, add-to-cart, checkout-start, purchases, refunds).
POST /api/abandon — abandon-tracking event when the customer closes the modal mid-generation.
POST /api/tracking/lookup — server-side recovery of try-on attribution when cookies are unavailable (REST checkout flows).
GET /api/tenant/tracking-token — fetch the per-tenant frontend tracking token (admin Settings page).
Enable analytics at WooCommerce → AnyTry AI → “Send analytics & conversion events”. The Try-On feature works regardless.
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_
anytry_result_
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).
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:
Customer clicks “Try On” on a product page.
They upload a photo of themselves.
AI generates a photorealistic image of them wearing the product.
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
Navigate to WooCommerce > AnyTry AI in the admin panel.
Enter your API key or start a free trial.
Customize the button appearance (color, text, position).
Enable AI Size Advisor (optional).
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 distribution includes the full unminified source under src/js/anytry.js and src/css/anytry.css alongside the minified runtime assets in assets/ — this satisfies the WordPress.org source-visibility guideline. The minified files are generated from those sources with the minify_wp.js build script. The build/development tooling lives in the plugin’s source repository and is intentionally not bundled in the distributed ZIP (only plugin runtime + the unminified src/ sources ship); the build process is documented below so anyone can reproduce the minified assets from source.
Build steps (run from a checkout of the plugin’s source repository, where the tools/ directory is present):
cd
npm install esbuild (one-time)
node minify_wp.js
Build dependencies: Node.js 18+ and esbuild. The build script (tools/minify_wp.js) generates 5 minified files from 5 sources:
src/js/anytry.js → assets/js/anytry.min.js (storefront runtime)
src/css/anytry.css → assets/css/anytry.min.css (storefront styles)
src/css/anytry-admin.css → assets/css/anytry-admin.min.css (admin Settings page styles)
assets/js/anytry-admin-settings.js → assets/js/anytry-admin-settings.min.js (admin Settings page helpers; small enough that the unminified source lives in assets/ directly rather than src/)
assets/js/anytry-admin-packshot.js → assets/js/anytry-admin-packshot.min.js (WP media-library hook for the admin “Packshot” picker on product edit screens; small enough that the unminified source lives in assets/ directly rather than src/)
Third-party libraries shipped with the plugin:
assets/js/heic2any.min.js — heic2any v0.0.4 (MIT licensed). Upstream repository: https://github.com/alexcorvi/heic2any. Used for client-side HEIC → JPEG conversion before upload (iPhone camera output). Lazy-loaded only when the customer selects an HEIC file; can be disabled via the “iPhone HEIC support” toggle in WooCommerce → AnyTry AI settings.
