﻿=== Payments Square Connect ===
Contributors: wppayments
Tags: woocommerce, square, payments, contact form 7, wpforms
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Square Hosted Checkout for WooCommerce, CF7 & WPForms. Always-on Square, SKU sync, subscriptions.

== Description ==

= Pay on Square's page. Stay connected. Keep stock in sync. =

**Payments Square Connect** is built for store owners who want Square payments that *just work* — without checkout breaking, without surprise disconnects, and without inventory falling out of step.

Customers pay on **Square Hosted Checkout** (Square's secure page, not yours). You get WooCommerce orders, Contact Form 7, WPForms payments, and subscriptions — all through **one Square connection**.

**Why merchants choose this plugin:**

* **No extra plugin fee** — this plugin does not add a per-payment charge on top of Square's processing rates
* **24/7 support available anytime** — email, WhatsApp, and the WordPress.org forum whenever you need help
* **Checkout that doesn't break** — no card form buried inside your theme; buyers pay on Square and return automatically
* **Always-on Square connection** — access tokens renew in the background so API calls and checkouts keep working
* **Inventory in step (WooCommerce + Square)** — match products by **SKU** and Square catalog stock updates when a WooCommerce order is paid
* **One connect, every channel** — **WooCommerce**, **Contact Form 7**, **WPForms**, and **subscriptions** from the same account
* **Security built in** — card data never touches your WordPress server

= Stock stays aligned when you sell on WooCommerce =

Sell on WooCommerce, run your business on Square — keep both sides honest.

When a product **SKU in WooCommerce matches your Square catalog**, checkout sends that line item to Square with the right catalog link. After payment, **Square inventory updates automatically** so your Square Dashboard reflects what actually sold.

No manual mapping screens — use the **same SKU on both sides** and you're done. No matching SKU? The product still goes to checkout **by name and price** so nothing blocks the sale.

**Tip:** Use matching SKUs on WooCommerce products and Square catalog variations for the smoothest inventory sync.

= A connection that keeps working =

Square Connect should not die quietly after a few weeks.

This plugin **renews your Square access token automatically** (daily checks and before API calls) so payment links, checkout settings, and catalog lookups are less likely to fail with a stale connection. The Connect screen shows when your token was last renewed — reconnect once after updating to pick up the latest permissions.

= Quick start =

1. Install and activate **Payments Square Connect**.
2. Open **Payments Square Connect** in the WordPress admin sidebar.
3. Choose **Sandbox** for testing or **Live** for real payments.
4. Click **Payments Square Connect**, sign in with Square, and pick your **Square Location**.
5. Click **Save connection settings**.
6. Turn on WooCommerce, Contact Form 7, and/or WPForms (see below).

= Where to find settings =

Everything is under **Payments Square Connect** in the admin sidebar:

* **Payments Square Connect** — connect Square, choose Sandbox or Live, pick a location
* **Checkout Settings (Beta)** — wallets, tipping, branding, and policies on Square checkout (**Live mode only**)
* **Subscription Plans** — view your Square plans and copy plan IDs
* **Support** — **24/7 support available anytime** via email, WhatsApp, or the WordPress.org forum

= Connect Square =

Every payment uses this screen first.

1. Go to **Payments Square Connect → Payments Square Connect**.
2. Pick **Sandbox** while testing, or **Live** when you are ready to take real payments.
3. Click **Payments Square Connect** and sign in with your Square account.
4. Choose your **Square Location** from the list.
5. Click **Save connection settings**.

**Tips**

* Start in **Sandbox** so you can test without charging real cards.
* If you move your site to a new address, connect Square again from this page.
* Use **Disconnect Square** if you need to switch accounts.

= WooCommerce =

WooCommerce is **optional**. Install it only if you sell through a WooCommerce store.

1. Complete **Connect Square** above.
2. Go to **WooCommerce → Settings → Payments → Payments Square Connect**.
3. Turn the gateway **on**.
4. Set **Title** and **Description** (what shoppers see at checkout). Example: "Pay with Square".
5. Save and place a test order.

**At checkout:** the customer chooses your Square gateway, is sent to Square to pay, then returns to your **Order received** page.

**Subscriptions (optional):** create plans in Square, refresh **Subscription Plans** in this plugin, then pick a plan on each WooCommerce subscription product.

= Contact Form 7 =

Contact Form 7 is **optional**. Use it for donations, fees, registrations, and similar forms.

**One-time payment**

1. Connect Square first.
2. Add a tag to your form:
   * Fixed amount: `[square_pay amount:25.00]`
   * Amount from a form field: `[square_pay amount-field:your-amount]`
3. Publish the form. After submit, the visitor pays on Square and returns with a success message.

**Subscription signup**

1. Create plans in Square and copy a plan ID from **Subscription Plans**.
2. Add a tag like: `[square_subscribe variation:YOUR_PLAN_ID name:"Silver Membership" amount:15.00]`

= WPForms =

WPForms is **optional**. Use it for donations, fees, registrations, and similar forms with the familiar WPForms builder.

**One-time payment**

1. Connect Square first.
2. Edit your form in **WPForms → All Forms**.
3. Add a **Single Item** payment field for the amount.
4. Add the **Square Hosted Checkout** field (under Payment fields).
5. Open **Payments** in the form builder and enable **Payments Square Connect → One-time payments**.
6. Publish the form. After submit, the visitor pays on Square and returns with a success message.

**Subscription signup**

1. Create plans in Square and copy a variation ID from **Subscription Plans**.
2. In the form **Payments** panel, enable **Subscription signup** and paste the **Square plan variation ID**.

= Subscription Plans =

Open **Payments Square Connect → Subscription Plans** to:

* See plans from your Square account
* Click **Refresh from Square** after you add or change plans
* Copy plan IDs for Contact Form 7 tags, WPForms forms, or WooCommerce products

**Good to know:** some payment methods (such as Cash App Pay and Afterpay) are not available for subscription sign-up.

= Checkout Settings (Beta) =

Customize Square checkout for payments created by this plugin.

**Live mode only** — switch to Live on the Connect screen first.

* **Merchant settings** — Apple Pay, Google Pay, Cash App Pay (Afterpay is managed in Square Dashboard)
* **Location settings** — customer notes, tipping, button style, store policy text

= Requirements =

* WordPress 6.0+
* PHP 7.4+
* A Square seller account
* WooCommerce — optional (for store checkout)
* Contact Form 7 — optional (for form payments)
* WPForms — optional (for form payments)
* WooCommerce Subscriptions — optional (for recurring products)

== Installation ==

1. Activate **Payments Square Connect**.
2. Open **Payments Square Connect** in the admin sidebar.
3. Choose **Sandbox** or **Live**, sign in with Square, and save a location.
4. Enable WooCommerce, WPForms, and/or Contact Form 7 if you need them.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. You can take payments through Contact Form 7 or WPForms without WooCommerce.

= Do I need Contact Form 7? =

No. If you only sell through WooCommerce or use WPForms, you do not need Contact Form 7.

= Do I need WPForms? =

No. WooCommerce and Contact Form 7 work independently. Use WPForms only if you want the WPForms builder.

= Where are the settings? =

**Payments Square Connect** in the WordPress admin sidebar.

= What is Sandbox vs Live? =

**Sandbox** is for testing — no real money. **Live** is for real payments. Start in Sandbox, then switch to Live when you are ready.

= How does the customer get back to my site? =

Square sends them back automatically after payment. WooCommerce shoppers see the order confirmation page. Form visitors return to the same form with a success message.

= Can I sell subscriptions? =

Yes. Create plans in Square, then use **Subscription Plans** in this plugin to connect them to WooCommerce products, Contact Form 7 forms, or WPForms.

= Does this plugin charge an extra fee on payments? =

No. **Payments Square Connect** does not add a platform or application fee on top of your payments. You pay Square's normal card processing rates only.

= Is support available? =

Yes. **24/7 support available anytime** — open **Payments Square Connect → Support** for email, WhatsApp, or the [WordPress.org support forum](https://wordpress.org/support/plugin/payments-connect-square/).

= Is card data stored on my site? =

No. Customers enter payment details on **Square Hosted Checkout**. Your WordPress site does not store card numbers.

= Does WooCommerce stock sync with Square? =

When product **SKUs match** between WooCommerce and your Square catalog, paid orders can update **Square inventory** automatically. WooCommerce also reduces its own stock when payment is confirmed. Use the same SKU on both sides for the best results.

== Screenshots ==

1. Connect your Square account, choose Sandbox or Live, and pick a location.
2. Checkout Settings: wallets, tipping, branding, and policies (Live mode only).
3. Subscription Plans: view Square plans and copy plan IDs.
4. WooCommerce: enable the gateway and set checkout title and description.
5. Contact Form 7: add Square payment tags to a form.
6. WPForms: Square Hosted Checkout field and Payments Square Connect panel.
7. Square Hosted Checkout: product names and totals shown on Square's payment page.

== Changelog ==

= 1.3.0 =
* **WPForms** — Square Hosted Checkout field, Payments Square Connect panel, one-time payments and subscription signup.
* **24/7 support** — help available anytime via Support page (email, WhatsApp, forum).

= 1.2.x (1.2.0 – 1.2.2) =
* Automatic Square OAuth token renewal; connect screen shows last renewal time.
* WooCommerce SKU catalog matching and Square inventory sync on paid orders.
* Documentation and plugin listing improvements.

= 1.1.x (1.1.0 – 1.1.9) =
* Admin menu: Connect, Checkout Settings (Beta), Subscription Plans, Support.
* Subscriptions for WooCommerce and Contact Form 7; checkout customization on Square hosted pages.
* WooCommerce itemized checkout lines; connection, Cash App Pay, and checkout settings fixes.

= 1.0.x (1.0.0 – 1.0.9) =
* Initial release: Square Hosted Checkout for WooCommerce and Contact Form 7, one shared Square connection.
* OAuth reliability, site URL change handling, and connection setup improvements.
