=== OnePageCheckout for WooCommerce ===
Contributors: nielslange
Tags: woocommerce, checkout, one page checkout, conversion, thank you page
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 9.4
WC tested up to: 11.1
Stable tag: 4.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A fast one-page WooCommerce checkout. Keeps your payment methods, shipping and taxes. Deactivate it and the standard checkout returns.

== Description ==

OnePageCheckout replaces the multi-step WooCommerce checkout with a single fast page: contact, delivery, shipping and payment together, with no page reloads. Your store keeps running exactly as before: payment gateways, taxes, shipping rates, coupons and integrations are WooCommerce's own and stay untouched.

= Features =

* **One-page checkout.** Contact, delivery, shipping and payment on one screen. Totals update instantly as customers choose.
* **Classic and block checkout.** On a classic (shortcode) checkout page the one-page design renders directly; on a block checkout page it runs the same design on the WooCommerce Store API (WooCommerce 9.8+). The plugin picks the right one automatically.
* **A better order confirmation.** A clean, reassuring order-received page with the order details, payment instructions and a help box. Tracking scripts and other plugins keep working on it.
* **Clear shipping and payment choices.** Each method is an easy-to-tap card next to a live order summary. On phones, the summary folds into a compact panel.
* **Login without leaving the page.** Returning customers sign in right on the checkout; guest checkout and optional account creation stay available.
* **Your branding, no code.** Logo, accent color and button shape. The defaults look good out of the box.
* **Trust content.** Short promises in the header, a trust row under the pay button and a help box on the confirmation page, each with icons, as many as you like.
* **Express checkout row.** Express payment buttons (e.g. Apple Pay or Google Pay) above the form when your payment gateway provides them.
* **Address autocomplete with your own Google key.** Suggestions from three letters; one tap fills street, house number, postcode and city. Bring a Google Places API key (see External services).
* **Optional extras.** Coupon field, sticky order summary, a marketing opt-in checkbox saved with the order, an editable cart in the order summary, your own pay-button text, a skip-the-cart-page redirect and a back-to-shop arrow.
* **Works with your theme** and with WPML and Polylang. Translated into 20+ languages.
* **Developer-friendly.** Add your own settings tab, put content before or after the checkout sections and restyle everything with CSS variables, from a child theme or a small plugin, without touching the plugin files. See `EXTENDING.md` in the plugin folder.

No capped lists, no greyed-out settings, no branding of ours on your checkout: this is the complete one-page checkout.

= OnePageCheckout Pro =

OnePageCheckout Pro is a separate, paid plugin from [onepagecheckout.pro](https://onepagecheckout.pro/#pricing). It replaces this plugin (your settings carry over) and adds:

* **Hosted address autocomplete.** OnePageCheckout Geo, our own address service based on OpenStreetMap data and hosted in Germany: no Google account, no API key, no per-request bills. Plans include a monthly allowance of address lookups.
* **A free-shipping progress bar** in the order summary, driven by your WooCommerce free-shipping rule.
* **An order bump:** one product offered as a one-click add at checkout.
* **Design presets and layout controls:** corners, density, summary position and custom CSS.
* **An enhanced thank-you page** with an order progress tracker and a "what happens next" block, and a **perks panel** next to the order total.
* **Plugin updates and support.**

Pro features you activated keep working on your site even if the license later expires; renewals cover updates, support and the hosted service. Nothing in this free plugin contacts our servers.

== External services ==

This plugin connects to one external service, and only if you set it up.

**Google Maps Platform (Places API)** — address autocomplete with your own key. It is off until you enter your own Google Places API key under WooCommerce → OnePageCheckout → Autocomplete and keep "Suggest addresses as customers type" switched on. Then, on the checkout page, the shopper's browser loads the Google Maps JavaScript API from `maps.googleapis.com` with your API key, and while the shopper types into an address field it sends the typed text (from three characters) and the selected country to `places.googleapis.com` to receive address suggestions, and the picked suggestion's id to fetch its address details. As with any request from a browser, Google also receives the shopper's IP address and browser details. Nothing is sent from your server, and without a key nothing is sent at all.

The service is provided by Google: [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms), [Google Privacy Policy](https://policies.google.com/privacy). Mention Google Maps Platform in your privacy policy when you use it.

== Frequently Asked Questions ==

= Will it break my payment gateways? =
No. The plugin keeps the standard WooCommerce payment area and checkout events, so Stripe, PayPal, cash on delivery, bank transfer and others behave exactly as before.

= What happens when I deactivate it? =
The standard WooCommerce checkout returns immediately. Your OnePageCheckout settings stay saved until you delete the plugin.

= Does it work with my theme? =
Yes. The checkout loads on its own focused page and is tested with Storefront, Astra, Kadence, GeneratePress, Blocksy and block themes.

= Does address autocomplete need a Google API key? =
In this plugin, yes: enter a Google Places API key (Places API (New) enabled, restricted to your website) on the Autocomplete tab. Google bills its usage to your Google account. If your site sends a Content-Security-Policy header, allow `script-src https://maps.googleapis.com` and `connect-src https://places.googleapis.com`. Without a key the address fields stay normal fields with browser autofill.

= Is it translation-ready? =
Yes. It works with WPML and Polylang and ships with its own translations for the checkout.

= Does it work with the classic and the new block checkout? =
Both. On a classic (shortcode) checkout page it renders the one-page design directly; on a block checkout page it runs the same design on the WooCommerce Store API (Block Mode, WooCommerce 9.8+). It picks the right one automatically. On WooCommerce below 9.8 the native block checkout is left untouched and a one-click switch to the classic checkout is offered.

= Which versions are supported? =
WordPress 6.7–7.1 and WooCommerce 9.4–11.1, on PHP 7.4+, verified against both the classic and block checkout. We support a rolling ~12-month window and re-verify every release. The current state is shown under Tools → Site Health → Info → OnePageCheckout (and WooCommerce → Status).

== Changelog ==

= 4.0.0 =
* New home on wordpress.org: the plugin is now "OnePageCheckout for WooCommerce" in the `onepagecheckout` folder; settings from earlier versions are copied over automatically.
* The free edition is complete on its own: header promises and the trust row take as many items as you like, and the settings show only what this plugin does.
* Coupon field and sticky order summary are switches in the settings.
* New: a calmer settings screen with one "More in Pro" note per tab.
* Settings screen: every field has a proper label for screen readers, small texts have more contrast, and the illustrations are translated and use your shop currency.
* For developers: new extension points for design tokens, the order summary, the thank-you page and the settings screen (see EXTENDING.md).
* The order confirmation now asks for a login or the order's email address wherever WooCommerce does (an order link opened later or by someone else), instead of showing the order details.

= 3.0.6 =
* Block checkout: a cart request that never answers no longer freezes the Pay button — the shopper gets a clear message within 30 seconds and can try again.
* Block checkout: while an earlier change is still being saved, nothing else is sent that could overwrite it; Pay says "An earlier change is still being saved…" instead of placing an order with an outdated cart, and the order total is re-checked before paying.
* Block checkout: an HTML error page on the coupon request shows a proper message; invalid fields are marked the moment Pay is clicked; a double click starts one payment only; the caret stays where the shopper types.
* Block checkout: country changes keep the postcode when you step back with the arrow keys or the browser autofills it, and failed quantity changes are reported.
* Settings: right margin on phones.

= 3.0.5 =
* Block checkout: a coupon applied right after changing the address no longer disappears, and the address is never lost or cleared — all cart updates are now saved one after another.
* Block checkout: changing only the country clears the postcode visibly instead of leaving an invisible empty one.
* Block checkout: all errors of a failed payment attempt are shown at once (including an invalid e-mail), the first one on the page gets the focus, coupon messages stay until you act on them, and connection errors move the focus to the message.
* Settings: the settings page fits phone screens without sideways scrolling.

= 3.0.4 =
* Block checkout: errors are shown on the field that needs fixing (focused, with the message under it), and every failed payment attempt scrolls to the error.
* Block checkout: closing a notice with the keyboard no longer moves the page; coupon messages stay in your site's language.
* Block checkout: applying a coupon never overwrites address changes you are typing; payment-provider error messages are shown as sent; a failed payment attempt jumps to the first field that needs fixing (terms checkbox included); after a server error shoppers are asked to check their e-mail before retrying, to avoid duplicate orders.
* Address autocomplete: no duplicate requests, a fresh session after clearing the field, the list stays in view on phones, and house numbers follow the picked street.
* Payment box keeps its spacing on phones even when a payment plugin's styles remove it.
* Note: some WooCommerce messages may appear in English until you update your site's translations (Dashboard → Updates).

= 3.0.1 =
* New: coupon field in the mobile order summary.
* Fix: the billing address choice works without JavaScript; no validation flash in the block checkout when switching back to "Same as delivery address".
* Fix: third-party checkout fields no longer break the classic address layout (company/address 2 stay collapsed).
* Classic checkout: opt-in checkboxes that other plugins register as checkout fields (e.g. Klaviyo) are shown below the email field; checkboxes printed via billing-form hooks stay with the billing fields.
* Fix: right-sized summary thumbnails; no dropped quantity clicks.
* Fix: block checkout notices can be dismissed and clear after the next cart update; the coupon error matches the code entered.
* Fix: clean radio buttons under themes that add their own radio markers.
* Known: in the block checkout, checkout blocks from other plugins (e.g. Klaviyo's newsletter block) are not shown yet.

= 3.0.0 =
* Address autocomplete with your own Google key is available in the free version, also in the block checkout. New settings tab "Autocomplete".
* Picking a street without a number keeps the cursor in the field, ready for the house number. Keyboard and screen-reader support improved.
* New: set your own pay-button text (Content tab), optionally also replacing the labels payment methods bring themselves (e.g. "Proceed to PayPal").
* Redesigned billing address choice: "Same as delivery address" or "Use a different billing address" as two clear options, in their own section right after the payment methods.
* For developers: a supported Extension API. Add your own settings tab and settings, place content before or after the checkout sections (classic and block checkout), react to a ready event. See EXTENDING.md in the plugin folder.

= 2.9.1 =
* Fixed: "Skip the cart page" could make the checkout reload endlessly on stores where the cart and checkout are the same page. The setting now stands down there (and says so in the settings).

= 2.9.0 =
* Fixed: the settings live preview updates again when switching toggles.
* The Enhanced checkout toggle is now marked as the master switch in the settings.
* New: Skip the cart page (optional) — carts with items go straight to the one-page checkout; empty carts keep the cart page. A settings hint warns when no cart-editing surface remains.

= 2.8.2 =
* New opcw_blocks_preload_cart filter for page-cached Block Mode shells.

= 2.8.0 =
* Express checkout row is now a free feature (off by default; needs a gateway that provides express buttons).
* Fixed: saving one settings tab no longer resets the values of the other tabs.

= 2.7.0 =
* Custom / third-party checkout fields (added via WooCommerce's checkout hooks or field-editor plugins) now inherit the OnePageCheckout field styling instead of showing as unstyled native inputs. Classic checkout.

= 2.6.1 =
* Fix: the terms & conditions, newsletter and create-account checkboxes could render hollow, muted and slightly misaligned under some opinionated themes. The checkout now restores a crisp, aligned native checkbox regardless of theme.

= 2.5.0 =
* Verified compatibility with WordPress 7.0 and WooCommerce 10.9, and down to WooCommerce 9.4, on both the classic and block checkout (real orders placed on every combination).
* New: OnePageCheckout section in Site Health / WooCommerce Status showing the active checkout engine and version compatibility at a glance.

= 2.4.0 =
* Block Mode: native support for the WooCommerce block checkout — the same one-page design, running on the Store API. Works with block-integrated gateways (native components incl. saved tokens) and classic-only gateways alike. Requires WooCommerce 9.8+ on block pages.

= 2.3.1 =
* Fix: takeover detection during checkout AJAX (theme integrations saw the takeover as inactive in refreshed fragments); notice buttons pinned to design colors.

= 2.3.0 =
* One-click switch when the checkout page uses the WooCommerce checkout block (with backup + restore).
* Compatibility: native review-order hooks in the summary, EU-VAT fields surfaced, theme-bleed CSS hardening, block-theme support polish.
* All 21 translations completed and repaired; clearer admin and checkout wording.

= 2.2.0 =
* Editable cart in the order summary — change quantities and remove items without leaving checkout (opt-in).
* Optional back-to-shop arrow in the header.

= 2.1.0 =
* Live checkout preview in the settings screen — see your design and content changes instantly.

= 2.0.0 =
* Professional tabbed settings, 20+ translations.

= 1.0.0 =
* Initial release.
