=== TukiFlow Direct Checkout for WooCommerce ===
Contributors: tukidevs
Tags: woocommerce, buy now, direct checkout, cod, shortcode
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.0
WC requires at least: 7.0
WC tested up to: 10.9.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a Buy Now button and native checkout landing pages to WooCommerce, so shoppers move from product to checkout in fewer steps.

== Description ==

TukiFlow adds a Buy Now path on top of WooCommerce. A shopper clicks a TukiFlow Buy Now button, or opens a TukiFlow checkout page built for a campaign, and TukiFlow prepares the WooCommerce cart and sends them straight to checkout. Payment, shipping, tax calculation, and order creation stay with WooCommerce at every step.

= Key Features =

* Buy Now button on single product pages and on shop/archive product cards
* Choice of button placement: before or after Add to Cart
* Global and per-product button text
* Option to keep the current cart or clear it first when Buy Now is used
* Option to hide Add to Cart globally or for individual products
* Per-product controls to disable Buy Now, disable Add to Cart, or set a default quantity
* Separate style controls for single-product and shop/archive buttons
* Admin-created checkout landing pages with product search, thumbnails, and pricing
* Page-editor metabox for building multi-product checkout pages
* Direct checkout shortcode for single-product pages
* Optional bundled Elementor template for landing pages

== Buy Now Buttons ==

* Enable a Buy Now button on single product pages
* Enable a Buy Now button on shop and archive product cards
* Place the single-product button before or after Add to Cart
* Set a global label for the Buy Now button, with a per-product override available
* Inherit the theme's WooCommerce button styling by default
* Redirect to native WooCommerce checkout after the item is added
* Respect the variation selected on the product page before redirecting
* Respect the quantity entered on the product page before redirecting

== Cart Behavior ==

* Keep the current cart contents when Buy Now is clicked
* Or clear the cart first, then add only the selected product

This lets a store run a fast-checkout flow that keeps existing cart items, or a single-offer flow that checks out one product at a time.

== Add to Cart Visibility ==

* Hide Add to Cart globally, anywhere a TukiFlow Buy Now button is shown
* Hide Add to Cart for one product only, from the product editor

== Product-Level Settings ==

Set from the WooCommerce product editor, on a per-product basis:

* Disable the Buy Now button for that product
* Disable Add to Cart on that product's single-product page
* Set a default quantity for that product
* Override the global Buy Now button text

These settings apply on top of the global setup, so campaign products can behave differently from the rest of the catalog without changing store-wide settings.

== Button Styling ==

* Style single-product Buy Now buttons separately from shop/archive (loop) buttons
* Background color, hover background color, text color, hover text color
* Border color, hover border color, border width, border radius
* Font size, font weight, padding
* Width behavior: auto, full width, fit-content, or a custom width

== Landing Pages ==

TukiFlow includes two ways to build a checkout landing page.

**Admin Create Flow** (TukiFlow > Landing Pages)

* Create a draft checkout landing page from a guided popup flow
* Set the page title and slug
* Search WooCommerce products, with thumbnails and pricing shown during selection
* Set a default quantity for the selected product
* Apply a landing page template, where one is available
* Open the created page directly in the WordPress editor
* View all existing TukiFlow landing pages in a list, with Edit and View actions

**Page Editor Metabox Flow**

* Enable TukiFlow checkout on any WordPress page from the page editor sidebar
* Select one or more products in the page-level metabox
* Set a quantity for each selected product
* Place the `[tukiflow]` shortcode where checkout should render

Landing pages rebuild the WooCommerce cart when the page loads, then render checkout through the standard WooCommerce checkout output.

== Shortcode Checkout ==

Embed a direct checkout on any page:

`[tukiflow product_id="123"]`

An optional quantity attribute:

`[tukiflow product_id="123" quantity="2"]`

== Template Support ==

* Start a landing page from a blank, default setup
* Apply a bundled template during landing page creation, where available
* Import the bundled Elementor-based landing page template if Elementor is active

== WooCommerce Compatibility ==

TukiFlow prepares the cart, then hands off to WooCommerce for the rest:

* Native WooCommerce checkout fields
* WooCommerce payment gateways
* WooCommerce shipping and tax calculation
* WooCommerce order creation
* WooCommerce order-received and order-pay endpoints

== Installation ==

**Automatic Installation**

1. In your WordPress dashboard, go to Plugins > Add New, search for "TukiFlow," then install and activate the plugin.
2. Go to the plugin settings to enable Buy Now buttons on single product and shop/archive pages.
3. Set the global button text, placement, and cart behavior.
4. Open a product in the WooCommerce product editor to set product-level overrides, if needed.
5. Go to Landing Pages to create a checkout landing page, or add the `[tukiflow]` shortcode to a page.

**Manual Installation**

1. Download the plugin ZIP file.
2. In your dashboard, go to Plugins > Add New > Upload Plugin, choose the file, and click Install Now.
3. Activate the plugin, then follow steps 2-5 above.

== Frequently Asked Questions ==

= Does TukiFlow replace WooCommerce checkout? =
No. TukiFlow prepares the WooCommerce cart and redirects to checkout. Payment, shipping, tax calculation, and order creation are handled by WooCommerce.

= Can I use Buy Now without removing Add to Cart? =
Yes. Add to Cart hiding is optional. It can stay visible, be hidden globally wherever Buy Now is shown, or be hidden for individual products only.

= Can the direct checkout shortcode include more than one product? =
The `[tukiflow]` shortcode with a `product_id` attribute supports a single product.

= Does Buy Now respect product variations and quantity? =
Yes. On single product pages, the selected variation and the quantity entered in the quantity field are respected before the shopper is redirected to checkout.

= Can different products have different Buy Now settings? =
Yes. From the WooCommerce product editor, Buy Now and Add to Cart can be disabled per product, and each product can have its own default quantity and button text.

= Do I need Elementor to create landing pages? =
No. Landing pages can be created with the default blank setup. The bundled Elementor template is only available for import if Elementor is active on the site.

= Does clicking Buy Now clear my existing cart? =
That depends on the cart behavior setting. A store can keep existing cart contents when Buy Now is clicked, or clear the cart first and add only the selected product.

= Where do I configure TukiFlow? =
Buy Now, cart behavior, and button styling are configured from the TukiFlow settings area. Landing pages are managed from TukiFlow > Landing Pages.

== Changelog ==

= 1.2.0 (Jul 10, 2026) =
* Adds stable checkout landing pages powered by the default WooCommerce checkout.
* Adds a dedicated Landing Pages screen to create and manage TukiFlow checkout pages.
* Adds product-level controls for Buy Now visibility, Add to Cart visibility, default quantity, and custom button text.
* Adds separate styling options for single-product and shop/archive Buy Now buttons.
* Improves Buy Now buttons on single product pages, shop/archive pages, and product grids.
* Improves compatibility with existing WooCommerce payment, shipping, tax, and order workflows.
* Optimizes plugin assets and cleanup for a lighter release package.
* Fixes several bugs and improves overall stability.
* Removes legacy checkout assets that are no longer required.
* Adds bundled landing page templates, including 1 Gutenberg template.

= 1.0.1 =
* Refresh TukiFlow admin branding with the plugin logo and purple brand color.
* Add branded default styling for Buy Now buttons.

= 1.0.0 =
* Initial public release
