=== Bindl - Photo Book Editor for WooCommerce ===
Contributors: easzy
Tags: woocommerce, photo book, product designer, print on demand, personalization
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

Let your customers design their own photo book from your product page. Orders, print files and payouts stay in your own WooCommerce store.

== Description ==

Bindl adds a photo book editor to your WooCommerce store. A shopper opens a book
product, lays out their pages, and orders through your normal checkout. You
receive the order in WooCommerce, with a print-ready PDF attached to it.

Everything that touches money stays where it already is. The order is a
WooCommerce order, the payment goes through your own gateway, and the customer
never leaves your brand.

**What the plugin does**

* Connects your store to Bindl from your WordPress admin, with no redirect.
* Puts the editor button on your book products, in classic themes, block themes,
  or wherever you place the shortcode.
* Opens the editor over your product page rather than sending the shopper away,
  so your header, your cart and your brand stay on screen. One click closes it.
* Shows a book's price as a starting price, because a book has no final price
  until it is configured.
* Registers the two order notifications Bindl needs, checks them daily, and
  repairs them by itself when WooCommerce turns them off.

**What you need**

A Bindl account, and a store served over https. Book products appear in your
catalogue once your Bindl shop syncs them; this plugin does not create products.

== Installation ==

1. Install and activate the plugin.
2. Open your Bindl admin, go to E-commerce, choose WooCommerce, and generate a
   pairing code.
3. In WordPress, open **Bindl** in the menu, paste the code, and click Connect.

That is the whole setup. The plugin creates the WooCommerce API key Bindl needs
and registers the order notifications for you, and removes both if you
disconnect.

== Frequently Asked Questions ==

= Do I need a Bindl account? =

Yes. The editor, the book formats and the print files come from Bindl. This
plugin is the bridge between that and your store.

= Does the plugin send anything anywhere before I connect it? =

No. An installed but unconnected plugin makes no outbound request at all. The
first call happens when you press Connect.

= Where does the customer edit their book? =

On bindl.app, in your shop's own space, with your branding, shown over your own
product page. They never leave your store, and they check out in it.

If their browser refuses the overlay, the button behaves like the plain link it
has always been and opens the editor in the same tab. Nothing is lost either
way: the book is saved on Bindl, not in the browser.

You can turn the overlay off under **Bindl > Storefront** if you would rather
send shoppers straight to the editor.

= My theme does not show the button. =

Block themes assemble the product page from blocks, so there is no hook to
attach to. Add the **Bindl editor button** block to your single product
template, or drop the `[bindl_cta]` shortcode where you want it.

= Orders stopped arriving in Bindl. =

WooCommerce turns a webhook off by itself after repeated delivery failures, which
usually means the site was unreachable for a while. Open **Bindl** in the menu
and press *Repair order notifications*. The plugin also checks this once a day
on its own.

= What happens when I uninstall? =

The API key and the order notifications are removed from this store, and Bindl is
told to forget the credentials it holds for it.

== External services ==

This plugin connects to the Bindl API at `https://api.bindl.app` to pair your
store, to read the state of the connection, and to open your Bindl dashboard.

**What is sent, and when**

* When you press Connect: your site address, the WooCommerce API key the plugin
  just created for Bindl, a secret used to sign order notifications, and the
  plugin version. This is what lets Bindl read your products and receive your
  orders.
* When the plugin page is opened, once a day, and when you press Repair: the
  connection's own token, so Bindl can answer with the state of that connection.
* When you press *Open my Bindl dashboard*: the connection's token, in exchange
  for a short-lived sign-in link.

No customer data, order content or personal data is sent by this plugin. Order
content reaches Bindl through the WooCommerce order notifications you approve at
connection time.

Bindl terms: https://bindl.app/legal/terms
Bindl privacy policy: https://bindl.app/legal/privacy

Your customers load the book editor from bindl.app when they click the button on
a book product, either over your page or in place of it. Bindl only allows that
frame on the storefront addresses your store registered when you connected it.
The Bindl privacy policy above covers what happens inside the editor.

== Screenshots ==

1. The connection screen: paste the pairing code, and nothing else.
2. A connected store: the state of the order notifications, and what is left to do.
3. A book product with the editor button in place of the buy button.
4. The Bindl editor button block in a block theme's product template.
5. The editor your customers get, with the layouts and the colours you chose.
6. The Bindl admin, where the book themes your store offers are designed.

== Changelog ==

= 1.0.3 =
* The overlay now also catches the buttons a block theme draws itself
  (product grids, related products), which linked straight to the editor
  in a new tab, and it loads on every storefront page of a shop that
  sells Bindl books.

= 1.0.2 =
* The editor overlay now opens on iOS Safari too: the tap on the button
  text was read as a plain link and navigated away instead.

= 1.0.1 =
* The close button over the editor becomes a bar above it that reads
  "Back to <your shop>", so nothing sits on top of the editor's own controls.
* Translations now come from translate.wordpress.org as language packs instead
  of files bundled in the plugin.
* The order-notification error is shown on the shop's admin screens only.

= 1.0.0 =
* First release: pairing without a redirect, self-repairing order notifications,
  storefront button for classic themes, block themes and shortcodes, and the
  editor opening over the product page instead of navigating away.

== Upgrade Notice ==

= 1.0.3 =
Block-theme product buttons now open the editor overlay too.

= 1.0.2 =
Fixes the editor overlay not opening on iPhone.

= 1.0.1 =
A bar above the editor replaces the close button that could hide its controls.

= 1.0.0 =
First release.
