=== KB External Store Buttons for WooCommerce ===
Contributors: abhishekpadhi
Tags: woocommerce, buy button, external store, amazon, whatsapp
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Replace or complement WooCommerce Add to Cart with marketplace buttons like Amazon, Flipkart, WhatsApp and any custom external store.

== Description ==

KB External Store Buttons for WooCommerce lets you send shoppers straight to where you actually sell — Amazon, Flipkart, WhatsApp, or any external store — instead of (or alongside) the standard Add to Cart button.

Rather than hardcoding a fixed set of marketplaces, the plugin gives you a **Marketplace Manager**. Define any marketplace once with its own name, icon and colour, then simply paste the matching URL on each product. No plugin update is needed when a new marketplace becomes popular — just add it.

= Key features =

* **Marketplace Manager** — add, rename, reorder, enable/disable or remove any marketplace from one screen.
* **Built-in icons** — WhatsApp, Amazon and Flipkart for the default marketplaces, plus a set of generic store/cart/bag/gift/globe/link/phone icons and a **Custom SVG** option for the marketplaces you add.
* **Per-marketplace colours** — set the background and text colour for each button.
* **WhatsApp buttons** — send a pre-filled order message (product name, price and link) to your number.
* **Per-product URLs** — each product (and each variation) gets a URL field for every enabled link marketplace. Leave a URL empty to hide that button for that product.
* **Variable product support** — buttons update automatically when a shopper picks a variation.
* **Optional Add to Cart hiding** — hide Add to Cart on the product page and/or shop listings, independently of the buttons.
* **Direct "Buy Now" button** — an optional one-click button that adds the product (respecting the chosen quantity and variation) and sends the shopper straight to checkout.
* **Live preview** — see your buttons update as you edit the settings.
* **Adjustable button size** and an option to show or hide icons.

= Built for stores that sell elsewhere =

Affiliate stores, catalogue sites, brands that list on multiple marketplaces, and businesses that take orders over WhatsApp can all use the same buttons without touching code.

== Installation ==

1. Upload the `kb-external-store-buttons` folder to `/wp-content/plugins/`, or install the plugin through the Plugins screen in WordPress.
2. Activate the plugin through the **Plugins** screen.
3. Go to **WooCommerce → External Store Buttons** to manage your marketplaces and display options.
4. Edit any product and enter the marketplace URLs under the **External Store Buttons** section on the General tab (or per variation for variable products).

WooCommerce must be installed and active. If it is not, the plugin stays dormant and shows a notice instead of causing errors.

== Frequently Asked Questions ==

= Do I have to use Amazon, Flipkart and WhatsApp? =

No. Those are just the defaults. You can disable or delete them and add your own marketplaces with any name, icon and colour.

= How do I add a marketplace that is not in the icon list? =

When adding a marketplace, choose **Custom SVG…** as the icon and paste your own `<svg>` markup. Use `fill="currentColor"` if you want the icon to follow the button's text colour. Scripts are stripped for security.

= Where do I enter the product links? =

On each product's **General** tab you will see a URL field for every enabled link-type marketplace. For variable products, each variation has its own URL fields. Leave a field empty to hide that button for that product.

= Does the WhatsApp button need a URL per product? =

No. WhatsApp-type marketplaces use the single WhatsApp number set on the settings page and build an order message automatically.

= Does it work with variable products? =

Yes. The correct links appear when the shopper selects a variation.

= Will it break my site if I deactivate WooCommerce? =

No. The plugin checks for WooCommerce and simply does nothing (aside from an admin notice) when it is inactive.

== Screenshots ==

1. The Marketplace Manager with per-marketplace icon, colour and type, plus a live preview.
2. Marketplace buttons on a single product page.
3. Per-product marketplace URL fields on the product editor.

== Changelog ==

= 1.0.0 =
* Initial release.
* Marketplace Manager with unlimited custom marketplaces.
* Built-in WhatsApp, Amazon and Flipkart icons plus generic icons and custom SVG support.
* Global button colour scheme (background, text and hover), per-product and per-variation URLs.
* WhatsApp order-message buttons.
* Optional direct "Buy Now" button for one-click checkout.
* Optional Add to Cart hiding, adjustable button size, live preview.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
