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

Square Hosted Checkout for WooCommerce and Contact Form 7. Connect once for one-time and subscription payments.

== Description ==

= A smarter way to accept Square payments on WordPress =

Most Square payment plugins show the payment form on your own checkout page. That can break when a theme, plugin, or cache gets in the way.

**Payments Square Connect** sends customers to **Square Hosted Checkout** — Square's own payment page. After they pay, they come back to your store or form automatically.

**Why merchants like it:**

* **Fewer checkout problems** — payment does not depend on your theme or other plugins
* **Better security** — card details are entered on Square, not on your WordPress site
* **One connection** — use the same Square account for **WooCommerce**, **Contact Form 7**, and **subscriptions**

= 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 and/or Contact Form 7 (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** — 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]`

= 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 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)
* 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 and/or add Contact Form 7 tags if you need them.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

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

= Do I need Contact Form 7? =

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

= 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 or Contact Form 7 forms.

= Why are Checkout Settings greyed out? =

Checkout Settings work in **Live mode only**. Connect in Live to change wallets, tipping, and branding.

= Is card data stored on my site? =

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

= How do I get help? =

Open **Payments Square Connect → Support** for email, WhatsApp, or the [WordPress.org support forum](https://wordpress.org/support/plugin/payments-connect-square/).

== 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. Square Hosted Checkout: product names and totals shown on Square's payment page.

== Changelog ==

= 1.1.9 =
* Support page: remove visible WhatsApp phone number; Open WhatsApp button still works.

= 1.1.8 =
* README: simplified, user-friendly documentation.

= 1.1.7 =
* WooCommerce checkout on Square now shows each product name (plus shipping and fees) instead of one generic order line.

= 1.1.6 =
* README: added overview of Square Hosted Checkout benefits.

= 1.1.5 =
* Fixed Cash App Pay setting not saving in Checkout Settings.

= 1.1.4 =
* Improved Square connection permissions for Checkout Settings.

= 1.1.3 =
* Fixed error after connecting Square in some setups.

= 1.1.2 =
* Square Connect works without WooCommerce installed.
* Clearer connection error messages when debug logging is on.

= 1.1.1 =
* New Support page with email, WhatsApp, and forum link.

= 1.1.0 =
* New admin menu with Connect, Checkout Settings, and Subscription Plans.
* Subscriptions for WooCommerce and Contact Form 7.
* Checkout customization for Square hosted pages.

= 1.0.9 =
* More reliable return to your site after Square sign-in.

= 1.0.8 =
* Fixed connection errors after redirect from Square.

= 1.0.7 =
* Fixed connect failures when the site URL changes.

= 1.0.6 =
* Easier first-time Square connection setup.

= 1.0.5 =
* One Square connection for WooCommerce and Contact Form 7.
* Contact Form 7 payment tag support.

= 1.0.4 =
* Plugin updates and licensing improvements.

= 1.0.3 =
* WordPress.org naming and compatibility updates.

= 1.0.2 =
* Display name and text domain updates.

= 1.0.0 =
* Initial release.
