=== Free Upsell & Cross-Sell Editor for WooCommerce – Bulk, Variations & Discounts ===
Contributors: apusnest
Tags: woocommerce, upsell, cross-sell, variations, frequently bought together
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 5.0
WC tested up to: 11.0
Stable tag: 1.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

Free bulk editor for WooCommerce up-sells & cross-sells. Link products or single variations, add bought-together discounts, CSV import/export.

== Description ==

Tired of opening dozens of product pages just to link a few upsells or cross-sells? **Free Upsell & Cross-Sell Editor for WooCommerce** is a free, table-based editor right in your WooCommerce dashboard. Edit hundreds of products in bulk — and, unlike the built-in linked-products box, link **variations**: suggest the matching size of the pants when a shopper picks a shirt size, and give it a discount that only applies when both are in the cart.

**Free forever. No premium version, no locked features.**

= Key Features =

* **Fast Bulk Editing:** Add or remove upsells and cross-sells for multiple products at once.
* **Dynamic Product Search:** Instantly search for products by name or SKU to link them.
* **Custom Cross-Sell Discounts:** Offer a percentage discount on a cross-sell product, but only when the "trigger" product is in the cart.
* **For Variations:** Link up-sells and cross-sells to individual variations — and to individual variations of other products. The product page updates live as the shopper picks a variation, and the suggested variation opens pre-selected.
* **With Discounts:** Give any cross-sell a percentage discount that applies in the cart only while the trigger product (or variation) is there. Shoppers see a "Special Offer" hint on the product page and the reduced price in the cart.
* **Copy & Paste:** Copy upsell/cross-sell settings from one product and paste them to others instantly.
* **Export / Import CSV:** Back up all linked products to a simple CSV (`id:discount` lists), edit it in a spreadsheet and import it back. Every import shows a review screen listing exactly what will be added, removed or changed before anything is written.
* **Intuitive Interface:** A clean, filterable table makes managing your product relationships simple.

This plugin is designed to save you time and help you increase your average order value through strategic product recommendations.

💡 Pro Tip: Don't just guess what sells well together. Use [Affinsy](https://affinsy.com?utm_source=wp&utm_medium=plugin&utm_campaign=buce) to run a full Market Basket Analysis and discover your store's most profitable product combinations scientifically.

= How variation links work =

The rule is simple: **the parent product's links are the defaults, a variation's links are extras.**

* Links set on a variable product apply to every variation.
* Links set on a variation are shown *in addition* to the parent's, only when that variation is selected.
* If a target is a specific variation (e.g. *Pants – M*), it replaces the plain *Pants* entry in the list and opens with that size pre-selected.
* Before a variation is selected, the page shows the parent's links plus the variations' targets collapsed to their parent product — so *Pants* appears once, not once per size.
* Discounts never stack. If both the parent and the variation discount the same product, the higher percentage wins.
* Reciprocal discounts (A discounts B and B discounts A) are allowed and simply act as a bundle deal.

== Installation ==

1.  Upload the `bulk-upsell-cross-sell-editor` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Navigate to **WooCommerce > Bulk Linked Products** to start editing.

== Changelog ==

= 1.3.0 =
* Fixed: variation-level up-sells and cross-sells now persist and display. WooCommerce never stores these for variations, so they are kept in plugin meta and rendered on the product page when a variation is selected.
* Fixed: cart discounts now apply when an offer targets a variable product and a variation of it is in the cart (and vice versa).
* Fixed: pasted / added tags rendered a stray "%%" and did not escape product names.
* New: CSV import shows a preview of all additions, removals and discount changes and asks for confirmation before applying.
* New: simpler CSV format (`Upsell IDs`, `Cross-sell IDs` as `id:discount`). Old exports still import.
* Copy/Paste and search never let a product link to itself.
* "Include Variations" and the category filter apply immediately.
* Links to a specific variation (variation → variation) open the target product with that variation pre-selected.
* "Frequently bought together" now shows the discounted price and a "20% off together" badge up front — on the product page and in the cart — instead of only after the other product is added.
* Fixed: bundled translations (de, es, fr, it, nl, pl) were never loaded because the plugin did not call load_plugin_textdomain(). All new strings translated; plural forms fixed.
* Variations without their own SKU: the editor and CSV export show the variation's real (blank) SKU instead of the inherited parent SKU; a CSV variation row without an ID whose SKU resolves to the parent is skipped with a warning instead of silently updating the parent.
* Clear rules for parent vs. variation links: parent links are defaults, variation links are extras; variation targets replace their parent product; before a variation is selected, variation targets are collapsed to their parent product. See "How variation links work".

= 1.2.0 =
* Improved variation editing: variations now show parent name, attributes, and product ID for easier identification.
* Better disambiguation of products sharing the same SKU.
* Added Copy & Paste and Export/Import features to readme description.
* Rebranded to Affinsy.

= 1.0.0 =
* Initial release.