=== Product-Linked Attributes Mapper for WooCommerce ===
Contributors: bigbadagency, sofrustrate
Tags: woocommerce, product attributes, taxonomy, product linking, ecommerce
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn selected WooCommerce global attributes into product-linked terms that behave like real products in the admin and on the front-end.

== Description ==

**Product-Linked Attributes Mapper for WooCommerce** lets you transform selected *global attributes* into **product-aware terms**.

Instead of treating attribute values as static text (e.g. “Brand X”, “Model Y”), this plugin allows those values to:

- Be searched as **products** in the WooCommerce admin
- Link directly to the corresponding **product page** on the front-end

This is especially useful for stores where attributes represent *real entities* — such as brands, models, strains, materials, or components that already exist as products.

---

### 🧠 What This Plugin Changes

Normally in WooCommerce:
- Attribute terms are flat taxonomy values
- They cannot reference products
- They are not clickable by default
- Searching attributes ≠ searching products

With this plugin:
- Selected global attributes become **product-linked**
- Attribute term selection can search **existing products**
- Front-end attribute values can link to product pages
- Admin workflows become faster for large catalogs

---

### 🔍 Example Use Cases

- Brand attributes that should link to brand product pages
- Model or variant attributes that represent standalone products
- Catalogs where attributes mirror product entities
- AI-generated catalogs that need relational cleanup
- Advanced WooCommerce setups with complex taxonomies

---

### ⚙️ Key Features

✔ Select which **global attributes** should be product-linked  
✔ Search **products** instead of raw terms when assigning attributes  
✔ Output clickable attribute values on product pages  
✔ Uses WordPress APIs (no direct SQL queries)  
✔ Object-cached lookups for performance  
✔ Safe, non-destructive behavior  
✔ Works with existing products and attributes  

No schema hacks.  
No database rewrites.  
No replacement of WooCommerce core behavior.

---

### 🆓 Free Version

The WordPress.org version is **fully functional** and includes:

- Attribute → product mapping
- Admin product search for selected attributes
- Front-end attribute linking
- Performance-safe term lookups

There are no time limits or forced upgrades.

---

### 🧩 Compatibility

- Requires **WooCommerce**
- Works with simple and variable products
- Compatible with most themes
- Does not modify theme files
- Uses standard WooCommerce hooks and filters

---

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install via Plugins → Add New
2. Activate the plugin
3. Go to **BigBad Agency → Product-Linked Attributes → Settings**
4. Select which global attributes should be product-linked
5. Save changes and begin using linked attributes

---

== Frequently Asked Questions ==

= Does this require WooCommerce? =
Yes. WooCommerce must be installed and active.

= Does this replace WooCommerce attributes? =
No. It enhances selected global attributes without removing or replacing core functionality.

= Will this affect existing products? =
Existing products remain unchanged until you choose to use product-linked attributes.

= Does it add new products? =
No. It links attribute values to products that already exist.

= Is this safe for large catalogs? =
Yes. The plugin avoids direct SQL queries and uses cached lookups for performance.

---

== Screenshots ==

1. Settings — pick which WooCommerce global attributes become linkable.
2. Attribute terms list (Color) — every term is selectable to link to a product.
3. Term edit screen — search and link a single product to this attribute term.
4. Frontend product page — attribute values render as clickable links to their linked products.
5. Built-in "How to Use" page with step-by-step setup.

---

== Changelog ==

= 1.0.5 - 2026-05-21 =
* Compatibility bump. Re-verified against current WordPress release.
* Raised Requires PHP floor to 7.4 (PHP 7.0-7.3 are EOL).
* No functional changes.

= 1.0.4 =
* Fix: removed Pro-related UI and placeholders from WordPress.org build
* Cleanup: confirmed free version is fully functional

= 1.0.3 =
* Fix: term-to-product lookup now uses `get_terms()` with object caching
* Security: improved nonce sanitization and handling
* Meta: updated readme compatibility headers

= 1.0.0 =
* Initial release

---

== Upgrade Notice ==

= 1.0.4 =
Fully functional free release with improved stability and performance.
