=== Dermaself AI Beauty Agent ===
Contributors: lmusso
Tags: woocommerce, skincare, quiz, product recommendations, beauty
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.3.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Analyse skin from a selfie with AI and build personalised skincare routines from your own WooCommerce catalog.

== Description ==

https://www.youtube.com/watch?v=1HJj8iKbDyg

**Science-based product recommendations, powered by AI.**

Dermaself combines an AI analysis of the visible characteristics of the skin in
a selfie, the customer's answers to a short quiz and the ingredients (INCI) of
your products, and builds a personalised skincare routine from **your** catalog.
Your customer adds the whole routine to the cart in one click.

You manage everything from your WordPress admin: the quiz and the routines,
branding, product recommendations, analytics and integrations.

= Features =

* **AI skin analysis** from a selfie and from the customer's answers to a quiz.
* **Skincare routines based on the skin profile and on INCI** — every product is
  matched to the skin through its ingredients, with the reason it was picked.
* **Custom questions** to learn more about your customers.
* **A fully branded experience** — quiz, colours, fonts, logo and button, on
  desktop and mobile.
* **Analytics** — skin test starts and completions, purchases from
  recommendations, attributed revenue and the questions where people stop.
* **Klaviyo and Mailchimp** — send the contacts who consent to marketing
  straight to your list.

= Built for WooCommerce =

* Place the skin test anywhere: a Gutenberg block, an Elementor widget, a
  shortcode, a floating button, or automatically on product, shop and cart
  pages, including the Cart block.
* Sync your catalog in one click: name, price, description, image and link are
  read automatically. Field mapping is there for data kept in custom fields.
* Correct the category of any product, and choose which steps each routine
  shows.
* Offer a discount on the recommended products only.
* The skin test is available in Italian, English and Spanish, and follows your
  store's language.

= How it works =

1. Your customer opens the skin test from your store and answers a few
   questions.
2. They take a selfie: Dermaself analyses visible skin characteristics such as
   dryness, redness, spots, pimples, pores and wrinkles.
3. They get a morning, evening and weekly routine made of your products, and
   add it to the cart.

= What you need =

A Dermaself account. Sign up at https://dermaself.it/signup, then paste the
key it gives you into the plugin's Connection screen. There is a free plan —
25 analyses a month, 100 products — paid plans raise both, and Enterprise, on
request, has no limits. Every screen and every feature works on every plan.

The quiz button appears on your store once the plugin is connected and the
quiz is published.

WooCommerce is required for the product catalog and cart features.

Setup guide and FAQ: [docs.dermaself.it/wordpress](https://docs.dermaself.it/wordpress/). Learn more at [dermaself.it](https://dermaself.it/).

== External services ==

This plugin sends data to services run by Dermaself S.r.l. so that the analysis
can be produced. Nothing is sent until you connect the plugin with a key.

**Dermaself service** (https://api.dermaself.it)
All plugin data goes here: your quiz configuration, your product catalog, quiz
sessions and their answers, the skin analysis, cart snapshots, and orders
containing recommended products. Requests are signed with your store's key.
Terms: https://dermaself.it/terms-and-conditions/ — Privacy: https://dermaself.it/privacy-policy/

**Dermaself quiz app** (https://embed.dermaself.it)
The quiz itself, loaded in an iframe on your storefront. It receives your shop
identifier, the customer's answers, and — if the customer takes one — their
photo, which is analysed and not stored on your site.
Terms: https://dermaself.it/terms-and-conditions/ — Privacy: https://dermaself.it/privacy-policy/

**OpenAI** (https://openai.com)
Product descriptions and ingredient lists you sync are sent to OpenAI by the
Dermaself service to classify each product. Customer data is not.
Terms: https://openai.com/policies/terms-of-use — Privacy:
https://openai.com/policies/privacy-policy

**Klaviyo / Mailchimp** — only if you connect them
Email address and first name of customers who explicitly consent to marketing on
the quiz's contact step. Nothing is sent without that consent.
Klaviyo: https://www.klaviyo.com/legal/terms-of-service —
https://www.klaviyo.com/legal/privacy-notice
Mailchimp: https://mailchimp.com/legal/terms — https://mailchimp.com/legal/privacy

**Stripe** (https://stripe.com) — only if you buy a paid plan
Payment is handled by Stripe on Dermaself's account. The plugin never sees card
details; it only sends you to Stripe's hosted checkout.
Terms: https://stripe.com/legal/ssa — Privacy: https://stripe.com/privacy

== Installation ==

1. Install and activate the plugin.
2. Go to **Dermaself → Connection** and paste your key.
3. Go to **Dermaself → Product Sync**, map your fields, and run a sync.
4. Go to **Dermaself → Publish** and choose where the quiz button appears.

== Frequently Asked Questions ==

= Do I need a paid plan? =

No. The free plan runs 25 analyses a month and maps up to 100 products, which
is enough to see it working on a real catalog. PDF skin reports are included.
When the 25 are used, the quiz pauses until the next month: your customers see
that the skin test is unavailable for now.

Every screen and every feature is available on every plan — the quiz builder,
the routine builder, theming, analytics and the marketing integrations included.
What a paid plan buys is volume, more products, and the quiz never pausing:

* Start, €180 a month: 180 analyses included, up to 100 products.
* Pro, €250 a month: 500 analyses included, up to 200 products.
* Enterprise, price on request: unlimited analyses and products, the Dermaself
  branding removed from the widget, a dedicated account manager and priority
  support. Write to hello@dermaself.it.

The Dermaself branding stays on the widget on Free, Start and Pro.

Analyses beyond the included ones are billed by usage, with graduated rates:
each rate applies only to the analyses that fall in its band.

* Start: analyses 181–250 at €1.00 each, 251–350 at €0.90, from 351 at €0.80.
  A month with 250 analyses costs €250 in total, 350 costs €340, 450 costs €420.
* Pro: analyses 501–600 at €0.475 each, 601–750 at €0.425, from 751 at
  €0.40. A month with 600 analyses costs €297.50, 750 costs €361.25, 850 costs
  €401.25.

The Subscription screen warns you at 80% and at 100% of the included analyses,
and suggests Enterprise once your extra analyses make it the cheaper plan.

Prices are in euros, before VAT. The full price list, with worked examples, is at [docs.dermaself.it/wordpress/billing](https://docs.dermaself.it/wordpress/billing/). You buy a plan, upgrade or switch between Start and Pro,
update your card, download invoices or cancel from the plugin's Subscription
screen; payments are handled by Stripe.

= Why don't I see the quiz button on my store? =

The button appears once the plugin is connected (**Dermaself → Connection**)
and the quiz is published in the Quiz Builder. Until then your customers see
nothing. The block editor and Elementor still show the button while you edit,
so you can place it before publishing. If you use a page cache, clear it after
publishing.

= What do my customers see when the quiz cannot run? =

A short "the skin test is unavailable right now" screen in your colours — for
example while the quiz is not published, when a subscription has lapsed, or
when the free plan's analyses are used up for the month.

= Does it work without WooCommerce? =

The quiz works, but recommendations and add-to-cart need WooCommerce, since they
are built from your products.

= What happens to my data if I uninstall? =

Uninstalling removes everything the plugin stored in your site, including the
key. Data held in your Dermaself account is not affected — delete it from there
if you want it gone.

= Where are the customer photos stored? =

They are analysed and discarded. They are not stored on your site and not kept
after the analysis.

== Screenshots ==

1. Science-based product recommendations, powered by AI: the skin analysis and the routine, in your store.
2. Recommendations powered by skin data and ingredients: every product is matched through its INCI.
3. A branded experience on desktop and mobile, customised from the plugin.
4. Activate leads: contacts who consent are sent to Klaviyo or Mailchimp.

== Changelog ==

= 1.3.10 =
* Product Sync shows the latest sync step by step: uploading the products,
  scoring their ingredients, writing the "why we picked it" explanations and
  translating them. The screen keeps updating until every step is done, and
  says plainly when a step failed and when it is tried again.
* The counters now refer to the latest sync. The all-time queue totals are
  still there, under "Queue history".

= 1.3.9 =
* The Skin Test now speaks the store's language: on an Italian (or Spanish)
  store the default questions and answers appear translated, and the texts
  saved in Customization > Translations reach the storefront questions.
* Product Sync: the queue counters now keep updating while products are
  being analysed, instead of stopping at the numbers shown right after
  "Sync All Products".
* Get started: a store still in WooCommerce "Coming soon" mode is flagged,
  with a link to launch it — until then shoppers see a holding page and
  never the Skin Test button.
* The developer-only "widget embed URL" field is gone from the Dashboard.

= 1.3.8 =
* Field mapping now offers the custom attributes typed on your products —
  an "Ingredients" attribute, for instance — as sources. Only global
  attributes were listed, so an INCI list kept in a product attribute could
  not be mapped.

= 1.3.7 =
* A "Get started" checklist on the Dermaself dashboard takes a new store from
  connecting to a Skin Test running on it: map the product fields, sync the
  catalog, publish the Skin Test, place the button and take a test. Each step
  ticks itself as soon as it is done, and the catalog step warns when the store
  has more products than the plan includes.
* New price list: Start (€180 a month) now includes up to 100 products, the
  €250 plan is called Pro and includes up to 200 products, and Enterprise —
  unlimited analyses and products, Dermaself branding removed, dedicated
  account manager — is available on request at hello@dermaself.it. The
  Dermaself branding stays on Free, Start and Pro. Analyses beyond the quota
  are billed by the same bands as before.
* The free plan's quiz now pauses reliably once the 25 analyses of the month
  are used: every analysis run from the quiz on your store is counted, and the
  quiz is told when one goes past the quota.
* The quiz button appears only once the plugin is connected and the quiz is
  published. Before, it showed up straight after installation and opened a
  basic analysis that was not part of your quiz.
* When the quiz cannot run — not published, subscription lapsed, free analyses
  used up — your customers see an "unavailable" screen in your colours instead
  of that basic analysis.
* On Enterprise, the Dermaself branding is removed from the widget.
* The Subscription screen warns you at 80% and at 100% of the included
  analyses — on Free, that the quiz will pause; on Start and Pro, that extra
  analyses are billed — and suggests Enterprise once your extra analyses make
  it the cheaper plan.
* Plan buttons say "Upgrade to" for a more expensive plan and "Switch to" for a
  cheaper one.
* When a routine is added to the cart, the quiz now learns which products made
  it in, so it can report a partial add.
* Adding a full routine to the cart takes one request instead of one per
  product, so it finishes in a few seconds. A long routine could take long
  enough for the quiz to report it as not added while every product was in
  the cart.
* After a full routine is added to the cart, the quiz shows the cart's real
  number of products and total. It could show one product and a total too few
  until the next change to the cart.

= 1.3.6 =
* New price list, in euros: Free (25 analyses a month, 100 products), Start
  (€180 a month, 180 analyses included) and Growth (€250 a month, 500 analyses
  included, branding removed). Paid plans have unlimited products, and the
  analyses beyond the quota are billed by band, each rate applying only inside
  its own band. The plan cards list the bands.
* The usage notice says what the analyses beyond the quota will add to the next
  invoice.
* Subscribers switch between Start and Growth from the plan cards, in place;
  the difference is prorated on the next invoice.
* The free plan's quiz pauses as soon as the last included analysis is used,
  instead of up to five minutes later.

= 1.3.5 =
* The plugin is now called Dermaself AI Beauty Agent.
* Every screen can now be translated in full. Labels that were printed in
  English whatever the site language — the placement options, the Quiz Builder,
  Routine Builder and Customization editors, field mapping, the product
  categories, the figures under each metric, session statuses and devices —
  now go through WordPress translations, as does the block's sidebar.
* Numbers, amounts, dates and order statuses follow the site's language.
* The Categories screen explains how Dermaself picks a product's category.
* Customization now sits right after Categories in the menu.
* Field mapping on the Product Sync screen is open by default.
* Error messages no longer show internal details of the Dermaself service, and
  the outdated "Azure SQL is not configured" message is gone.
* Quiz sessions saved before the first answer are no longer lost. The quiz
  sends its answers as an empty set when it has just started, and that save
  was being rejected, so sessions abandoned before the first answer never
  reached the reports and quizzes started were undercounted.

= 1.3.3 =
* The "Cart page" placement now works on stores that use the WooCommerce Cart
  block, which is the default for new stores. It used to show the button only
  on the classic cart template and did nothing, without warning, on the block.
  As before, the button appears only when the cart has something in it.
* Tested with WooCommerce 11.1.

= 1.3.2 =
* All JavaScript and CSS is now enqueued. The admin screens load their scripts
  as files with wp_enqueue_script and wp_localize_script, the quiz button's
  rules are a stylesheet, and the onclick, onerror and onsubmit attributes are
  delegated listeners — nothing the plugin prints contains a script or style
  tag any more.
* Translations are no longer bundled: they come from translate.wordpress.org,
  which generates and delivers a language pack for every locale.
* The "WooCommerce is missing" and "PHP is too old" notices are shown only to
  users who can install plugins, only on the Dashboard and Plugins screens, and
  can now be dismissed.
* The queue messages on Product Sync put the count in a placeholder rather than
  gluing it to a sentence, so they can be translated properly.

= 1.3.1 =
* The plan cards follow the published price list: Free ($0, 10 analyses a
  month, 20 products, quiz pauses at the quota), Start ($250, 300 / 60, $2 per
  extra analysis), Plus ($450, 500 / 150, $1 per extra analysis) and Growth (on
  request, unlimited, Dermaself branding removed). Each card now says what
  happens past its quota and where it stands on branding.
* A plan priced on request, or not yet purchasable, offers a contact button
  instead of a checkout.
* The over-quota notice quotes the plan's per-analysis rate.

= 1.3.0 =
* Plans renamed and re-scoped to match the published price list: Free (10
  analyses a month, 20 products), Intermedio (300 / 60), Medio (500 / 150) and
  Enterprise (unlimited). The free plan is now metered monthly rather than one
  analysis a day.
* Enterprise plans show what they add beyond volume — branding removed from the
  widget, a dedicated account manager, priority email support.

= 1.2.1 =
* Corrected the readme: it still said paid plans unlock analytics, theming, the
  routine builder and the integrations. They have not since 1.1.3 — every plan
  has every feature, and a plan buys volume.

= 1.2.0 =
* The plugin is now available in Italian.
* Recommended-product purchases are no longer lost when the Dermaself service
  is briefly unreachable: recording is retried with a widening delay, and an
  order that still cannot be recorded is marked so it can be found later.

= 1.1.3 =
* Tested against WordPress 7.1 and WooCommerce 11.0: every admin screen renders
  with no notices, and the minimum supported WordPress is now 6.5.
* Escaping, sanitisation and translator notes brought in line with the
  WordPress coding standards throughout.
* Every admin screen now appears on every plan. Routine Builder, Customization,
  Analytics and Integrations used to be hidden unless the subscription covered
  them; a plugin in this directory may not restrict functionality it already
  ships. The Dermaself service still decides what a plan can do, and says so on
  the screen.

= 1.1.2 =
* Answer distributions and drop-off are now proper bar charts, matching the rest of the reporting.

= 1.1.1 =
* The trend chart now matches the Shopify one: whole-number axis, smooth lines that cannot dip below zero, dated labels along the bottom, and a third line for recommended purchases.
* Added a bar chart of the journey from skin test to purchase on the dashboard.

= 1.1.0 =
* The dashboard now opens on your skin-test numbers — completion rate, purchases from recommendations, attributed revenue and cart attach rate — with a trend chart and the recommended products shoppers actually bought.
* Every figure shows the formula behind it and an explanation, on the dashboard and throughout Analytics.
* The daily trend is a chart instead of a table of rows.
* Drop-off now shows the share of starts, not only a count.
* Product Sync leads with the sync; field mapping moves behind an "advanced" section, since most stores want the standard mapping.
* Question distributions can be read as numbers or percentages.
* Fixed: the Funnel, Questions and Revenue tabs of Analytics failed to render.
* Fixed: the dashboard reported the service healthy without checking that your key was accepted.
* Renamed "Skin test views" to "Skin test starts", which is what the figure counts.

= 1.0.0 =
* First public release.
