=== ShopperQuiz ===
Contributors: wambuaj
Tags: quiz, product recommendation, woocommerce, personalization
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed ShopperQuiz product recommendation quizzes on your WooCommerce store.

== Description ==

ShopperQuiz helps shoppers find the right products through a personalised quiz experience. After answering a few questions, shoppers are shown their top product recommendations ranked by a voting engine.

This plugin embeds your ShopperQuiz quiz on any page or post via:

* **Shortcode:** `[shopperquiz id="your-quiz-id"]`
* **Gutenberg block:** Search for "ShopperQuiz" in the block inserter

= Requirements =

* A ShopperQuiz account at [app.shopper-quiz.com](https://app.shopper-quiz.com)
* WooCommerce 6.0 or higher
* Your store connected in the ShopperQuiz dashboard (Integrations → WooCommerce)

= How to connect =

1. In your WordPress admin go to WooCommerce → Settings → Advanced → REST API
2. Create a new API key with **Read** permissions
3. Copy the Consumer Key and Consumer Secret
4. In the ShopperQuiz dashboard go to Integrations → WooCommerce
5. Enter your Site URL, Consumer Key, and Consumer Secret and click Connect

= How to embed a quiz =

1. In the ShopperQuiz dashboard, open your quiz and copy the Quiz ID
2. Add the shortcode `[shopperquiz id="your-quiz-id"]` to any page, or use the ShopperQuiz Gutenberg block

== Installation ==

1. Upload the `shopperquiz` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Connect your store in the ShopperQuiz dashboard (see How to connect above)

== Frequently Asked Questions ==

= Does this plugin store any data? =

No personal data. The plugin loads the quiz widget from ShopperQuiz servers; all quiz data, responses, and product sync are managed by the ShopperQuiz platform. For orders placed from a quiz, it stores the quiz response id (and, with WooCommerce Subscriptions, which order lines were bought on a subscription) as hidden order meta for revenue attribution.

= Does it work with WooCommerce Subscriptions? =

Yes. When subscriptions are turned on for a quiz in ShopperQuiz, the results page offers "one-time or subscribe & save" on recommended products, using your WooCommerce Subscriptions plans — subscription products and subscription plans on regular products (WooCommerce Subscriptions 9.0+, or All Products for WooCommerce Subscriptions). The plugin adds two read-only REST routes for this: `/wp-json/shopperquiz/v1/subscription-plans` (plans of published products) and `/wp-json/shopperquiz/v1/subscription-summary` (counts).

= Which WooCommerce versions are supported? =

WooCommerce 6.0 and above. Tested up to WooCommerce 11.1.

= Can I use this on a non-WooCommerce WordPress site? =

The plugin requires WooCommerce for the cart integration. The quiz embed will work on any WordPress site, but cart functionality requires WooCommerce.

== External Services ==

This plugin connects to the ShopperQuiz platform, which is required for the plugin to function. ShopperQuiz is a product recommendation quiz builder — this plugin is the storefront embed component that loads the quiz widget built and managed on the ShopperQuiz platform.

= ShopperQuiz Widget (widget.shopper-quiz.com) =

This plugin loads the quiz widget JavaScript and CSS from https://widget.shopper-quiz.com. These files are loaded on any page or post where the shortcode or Gutenberg block is placed. Data is only transmitted when a shopper interacts with the quiz.

A ShopperQuiz account is required. Sign up at https://app.shopper-quiz.com.

* [Terms of Service](https://shopper-quiz.com/terms)
* [Privacy Policy](https://shopper-quiz.com/privacy-policy)

== Changelog ==

= 1.1.0 =
* Subscribe & save on quiz results with WooCommerce Subscriptions (subscription products and subscription plans on regular products)
* Subscription orders attributed to quizzes in ShopperQuiz analytics

= 1.0.0 =
* Initial release
