=== Artsn ===
Contributors: isaacartsn
Tags: woocommerce, customization, personalization, product preview, alterations
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A "Design Yours" button for product pages: shoppers request alterations, see a preview and reserve. You price or decline.

== Description ==

Design Yours adds a button under Add to cart on your product pages. A shopper describes the change they want (embroidery or print, colour or fabric, sizing, or something else), sees a preview made from your product photo, and reserves.

* If you have set a price for everything they chose, they go straight to your store's own checkout to pay.
* Otherwise the request arrives in your Artsn inbox. You reply with a price or decline. A priced request becomes an ordinary WooCommerce order the customer pays through your checkout, with your payment methods.

The order holds the product plus a "Design Yours" by Artsn fee line at the price of the customisation.

The order is created with the customer's name and email. When the customer pays, the payment page asks for their delivery address and saves it on the order; the address stays in your store and is not sent to Artsn. No shipping charge is added: include delivery in your price, or add a shipping line to the order before it is paid.

This plugin is the connection between your store and the Artsn service; the service does the work. It needs WooCommerce and an https store address with pretty permalinks.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to WooCommerce > Artsn and choose Connect to Artsn.
3. Approve access on the WooCommerce screen that follows. There is nothing to copy or paste. You come back to the same page.
4. Choose Open inbox and prices to set your prices.
5. Optionally change the button's text and colour on the same page.

The button appears under Add to cart. To place it elsewhere, add the `[design_yours]` shortcode to the product page.

== Screenshots ==

1. The Design Yours button on a product page.
2. A shopper describes a change and sees a preview beside the original.

== Frequently Asked Questions ==

= What access does Artsn get? =

A WooCommerce REST API key with read and write permission, issued by your own store when you approve the connection. Artsn uses it to read the product a shopper is customising (name, price, main photo), to create the order for a request, and to create one webhook that tells it when such an order is paid.

= How do I disconnect? =

WooCommerce > Artsn > Disconnect. Artsn erases the requests, previews and product copies it holds for your store, and the plugin deletes the API key and the webhook. Deleting the plugin does the same.

== External services ==

This plugin connects your store to Artsn (https://my.artsn.app), the service that provides Design Yours. It cannot work without it.

* On product pages, once the store is connected, the button's script (included in this plugin; nothing is loaded from another server) requests the product's name, price, photo and your price list from Artsn. Nothing about the shopper is sent until they use the button.
* When a shopper asks for a preview, the text of their request is sent to Artsn, which creates the image with an AI image model.
* When a shopper reserves, their name, email address and request are sent to Artsn.
* When you choose Connect, the plugin sends Artsn your store's address. When you approve, your store sends Artsn a WooCommerce REST API key. Artsn then reads product data and creates orders through your store's API, and your store sends Artsn a webhook when an order is updated.
* When you disconnect, delete the plugin, or erase a customer with WordPress's Erase Personal Data tool, the plugin tells Artsn so that it erases the matching data.

Terms of use: https://artsn.app/terms.html
Privacy policy: https://artsn.app/privacy.html

== Changelog ==

= 1.0.3 =
* Shoppers can now upload their own design (PNG, JPG or PDF) with a request.

= 1.0.2 =
* The Design Yours panel now scrolls with the mouse wheel and by touch on stores that use smooth scrolling.

= 1.0.1 =
* The options shoppers see now follow what your store sells, such as jewellery, interiors or art.

= 1.0.0 =
* First release.
