=== Twurn – 360° Product Spins for WooCommerce ===
Contributors: twurn360
Tags: 360, product spin, 360 product view, product gallery, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn a product's front and back photos into a 360° spin shoppers can drag. No photo shoot, no turntable.

== Description ==

Twurn turns two ordinary product photos, one from the front and one from the back, into a smooth 360° spin that shoppers can drag to see every side of the product. It takes about a minute, and you don't need a turntable, a studio or any new photos: the product photos already on your store usually work.

* **Made from two photos.** Pick the front and back photos from the product's images and press Make spin.
* **Shows on the product page.** Published spins appear first in your product images, with a 360° badge on the thumbnail. You can show them below the images instead, or anywhere with the `[twurn_spin]` shortcode.
* **Fast and light.** The viewer loads only when the spin scrolls into view, sets no cookies and doesn't track shoppers.
* **Works on phones.** Shoppers drag with a finger or the mouse; the product turns on its own for a moment when it first appears.
* **Pay per spin.** New accounts get free spins to try it. After that, buy spin packs at twurn.com; spins never expire, and a spin that fails is never charged.

= How it works =

1. Install the plugin and press **Connect to Twurn** (WooCommerce → Twurn spins). Sign in at twurn.com and you're sent straight back, connected.
2. Open a product. In the **360° spin** box, pick the front and back photos and press **Make spin**.
3. About a minute later, check the preview and press **Publish**.

= Photos that work best =

* One photo from the front and one from directly behind.
* Taken from the same distance and height, in the same light, ideally on a plain background.
* Products with a clear front and back turn best: bags, shoes, clothing, toys, gadgets, bottles and boxes.

== External services ==

This plugin relies on Twurn (https://twurn.com), a service run by the plugin's authors, to make and show 360° spins. The spins are made on Twurn's servers, so the plugin can't make them without the service. Nothing is sent to Twurn until you press Connect to Twurn.

* **Connecting:** when you press Connect to Twurn, you are sent to twurn.com with your site's name and the address of this plugin's settings page, so you can sign in and be sent back. The plugin then exchanges a one-time code for an API key, which is stored in your WordPress database.
* **Making a spin:** when you press Make spin, the two photos you picked, the product's name and its ID are sent to Twurn, which makes the spin. The plugin then checks the spin's progress, and tells Twurn when you delete a spin, delete the product, or disconnect.
* **Your account:** on the settings page, the plugin asks Twurn for your account's name and spins left.
* **Showing a spin:** on product pages with a published spin, shoppers' browsers load the spin's images from twurn.com. The viewer sets no cookies and sends no tracking data; Twurn's servers see only the basic request details any website receives.

Twurn terms of service: https://twurn.com/terms
Twurn privacy policy: https://twurn.com/privacy

== Source code ==

All of the plugin's code, including the 360° viewer (assets/twurn-spin.js), is included unminified and readable. There is no build step.

== Installation ==

1. In WordPress, go to Plugins → Add New, search for "Twurn" and install it (or upload the plugin zip).
2. Activate it. WooCommerce must be active.
3. Go to WooCommerce → Twurn spins and press **Connect to Twurn**.

== Frequently Asked Questions ==

= Do I need a Twurn account? =

Yes. You create one (free, with Google) when you press Connect to Twurn. New accounts get free spins to try it.

= How much does it cost? =

The plugin is free. Each spin uses one spin from your Twurn balance; packs are sold at twurn.com/dashboard. Spins never expire, and failed spins are never charged.

= Which photos should I use? =

One from the front and one from directly behind, taken from the same distance and height. The photos already on your product page usually work.

= Where does the spin appear? =

By default it's the first item in the product images. On variable products it's the second, so that choosing a variation still shows that variation's photo first. You can change this to "below the images" or "only where I add the shortcode" in WooCommerce → Twurn spins.

= What happens if I disconnect or uninstall? =

Published spins keep showing while the plugin is active, but you can't make new ones until you connect again. Deleting the plugin removes its settings and spin records from your site; your spins stay in your Twurn account until you delete them there.

== Changelog ==

= 0.1.2 =
* The "connect your store" notice can now be dismissed.
* Requests to Twurn no longer include your site's address.

= 0.1.1 =
* Fixed: product pages with a published spin could freeze with WooCommerce's gallery thumbnails.

= 0.1.0 =
* First release: connect to Twurn, make spins from product photos, publish them in the product gallery, below it, or with a shortcode.
