=== Dermaself Skin Advisor ===
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.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

An AI skin analysis quiz for your store: customers get a personalised routine and add the recommended products to their cart.

== Description ==

Dermaself Skin Advisor adds a skin analysis quiz to your WordPress or WooCommerce
store. A customer answers a few questions, optionally takes a selfie, and gets a
skincare routine built from **your** catalog — which they can add to the cart in
one step.

The plugin is the connector. The analysis itself runs on the Dermaself service,
which you connect to with a key from your Dermaself account.

= What it does =

* A quiz you can place anywhere: a Gutenberg block, an Elementor widget, a
  shortcode, a floating button, or automatically on product and cart pages.
* Recommendations drawn from your own products, mapped to your fields.
* Add the whole routine to the cart in one click.
* Reporting on which recommended products were actually bought.
* Optional lead capture, with the contact sent to your Klaviyo or Mailchimp list.

= 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 —
10 analyses a month, 20 products — and paid plans raise both. Every screen and
every feature works on every plan.

WooCommerce is required for the product catalog and cart features.

== 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 10 analyses a month and maps up to 20 products, which is
enough to see it working on a real catalog. When the ten are used, the quiz
pauses until the next month.

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, and the quiz never pausing:

* Start, $250 a month: 300 analyses a month and 60 products. Beyond the quota,
  $2 per analysis.
* Plus, $450 a month: 500 analyses a month and 150 products. Beyond the quota,
  $1 per analysis.
* Growth, priced on request: unlimited analyses and products, the Dermaself
  branding removed from the widget, a dedicated account manager and priority
  email support — all three are things we do, not code we withhold.

Prices are in US dollars, before tax. Plans are changed on the plugin's
Subscription screen; Growth starts with an email to hello@dermaself.it.

= 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.

== Changelog ==

= 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.
