=== Advanced Product Condition Manager for WooCommerce ===
Contributors: siddiqurrahman
Tags: woocommerce, product condition, item condition, used products, refurbished
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Easily set and display product conditions (New, Used, Refurbished, Open Box) on WooCommerce products with Schema.org rich snippets & bulk editing.

== Description ==

**Advanced Product Condition Manager for WooCommerce** empowers store owners to specify, manage, and display product conditions (New, Used, Refurbished, Damaged, Certified Pre-Owned, etc.) across their store.

Whether you run a recommerce store, electronics outlet, thrift shop, vintage boutique, or marketplace, this plugin helps you build buyer confidence, reduce returns, and boost SEO rankings with automated **Schema.org `itemCondition` structured data**.

[Support](https://wordpress.org/support/plugin/apcfw-product-condition-manager/)

---

### 🚀 Key Features

* **21+ Standard Condition Options:** Comprehensive list of industry-standard conditions grouped logically (New, Used, Refurbished, Damaged, Custom).
* **Schema.org Structured Data Integration:** Automatically adds `itemCondition` to Product Offer schemas for Google Rich Results & Merchant Center compliance.
* **Flexible Display Styles:**
  * **Text Only:** Minimalist text label (e.g., "Condition: Brand New").
  * **Color-Coded Badges:** Modern badges styled with distinct semantic colors for New (green), Used (orange/yellow), Refurbished (blue), and Damaged (red).
  * **Icon Placeholder:** Clean layout with an icon indicator.
* **Customizable Placement:** Choose exactly where the condition appears on Single Product pages and Shop/Archive grids (Before Title, After Title, After Price, Before Meta, etc.).
* **Full Variable Product Support:** Set conditions per individual variation or inherit from parent products, with instant live badge updates when customers select variations.
* **Quick Edit & Bulk Edit:** Update conditions for hundreds of products in seconds directly from the WooCommerce product list table.
* **Sortable Admin Column:** Easily sort products by condition in the WordPress admin table.
* **Custom CSS Editor:** Built-in custom styling box in settings to easily tailor badges and typography to match your theme.
* **WooCommerce HPOS Compatible:** 100% compatible with High-Performance Order Storage (COT) and WooCommerce 11.0+.
* **Lightweight & Fast:** Zero bloat, clean PSR-4 architecture, and optimized queries for maximum speed.

---

### 🏪 Perfect For

* **Refurbished Electronics & IT:** Laptops, smartphones, tablets, cameras, and audio gear.
* **Second-Hand & Recommerce Stores:** Thrift items, pre-owned fashion, consignment, and collectibles.
* **Vintage & Antique Shops:** Rare items with graded conditions.
* **Auto Parts & Hardware:** OEM new, remanufactured, used, and for-parts items.
* **Bookstores & Media:** New, like new, acceptable, and collector copies.
* **Clearance & Outlet Stores:** Open-box items, warehouse surplus, and products with minor packaging defects.

---

### 🛠️ Predefined Conditions Available

* **New Condition:**
  * Brand new
  * New
  * New with box
  * New without box
  * New with tags
  * New without tags
  * New with defects
* **Used Condition:**
  * Like new
  * Very good
  * Good
  * Acceptable
  * Pre-owned
  * Certified pre-owned
  * Used (Default)
* **Refurbished Condition:**
  * Manufacturer refurbished
  * Seller refurbished
  * Remanufactured
  * Retread
* **Damaged / Clearance:**
  * Damaged
  * For parts
* **Other:**
  * Custom (Specify details in product description)

---

### 💻 Developer Friendly & Extensible

Easily customize available conditions, schema mappings, or settings using standard WordPress filters:
* `apcmfw_product_condition_available_conditions` - Add or modify condition groups and labels.
* `apcmfw_product_condition_schema_map` - Custom mapping for Schema.org URLs.
* `apcmfw_product_condition_settings_fields` - Extend plugin settings.

== Installation ==

1. Log in to your WordPress admin dashboard.
2. Navigate to **Plugins > Add New** and search for `Advanced Product Condition Manager`.
3. Click **Install Now** and then **Activate**.
4. *(Optional manual installation)* Upload the `apcfw-product-condition-manager` folder to `/wp-content/plugins/` directory and activate.
5. Go to **WooCommerce > Settings > Products > Product Condition** to configure display positions and default options.
6. Edit any product to assign its specific condition.

== Frequently Asked Questions ==

= Does this plugin support Schema.org structured data for Google? =
Yes! The plugin automatically adds the official Schema.org `itemCondition` URL (such as `https://schema.org/NewCondition`, `https://schema.org/UsedCondition`, or `https://schema.org/RefurbishedCondition`) to your WooCommerce product offer JSON-LD schema.

= Does it work with Variable Products? =
Yes. You can assign conditions to individual variations under the **Variations** tab, or set a general condition on the parent product. On the frontend, selecting a variation will dynamically update the condition badge in real time.

= Can I show product conditions on the Shop / Category pages? =
Yes. In **WooCommerce > Settings > Products > Product Condition**, enable "Show on Shop Page" and choose your preferred hook position (Before Title, After Title/Rating, After Price, or After Add to Cart button).

= Can I update conditions in bulk? =
Yes. On the **Products** screen, select multiple products, choose **Bulk Actions > Edit**, click **Apply**, and set the new condition. You can also quickly edit single products using the **Quick Edit** link.

= Can I customize badge colors and styles? =
Yes. The plugin includes pre-styled badge CSS classes for each condition, and provides a **Custom CSS** field in the plugin settings to easily add your own styles.

= Is this plugin compatible with WooCommerce High-Performance Order Storage (HPOS)? =
Yes, the plugin is fully declared and tested for HPOS compatibility.

== Screenshots ==

1. Product condition global settings and display options under WooCommerce settings.
2. Assigning product condition on the product edit screen.
3. Condition badge and text display on the single product page.
4. Quick Edit and Bulk Edit product condition directly from the WooCommerce products list.

== Changelog ==

= 1.0.2 =
* Fix: Resolved fatal error on admin products list screen caused by incorrect asset nonce check.
* Fix: Fixed bulk edit condition saving handler for WooCommerce products.
* Add: Added live dynamic variation condition switching on frontend variable product pages.
* Add: Added parent condition inheritance for variable product variations.
* Tweak: Improved column sorting in admin product table with fallback for products without meta.
* Tweak: Enhanced Schema.org structured data integration.
* Tweak: Updated compatibility declarations for WordPress 7.1 and WooCommerce 11.0.

= 1.0.1 =
* Tweak: Translation and textdomain loading adjustments.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.2 =
Recommended update: includes critical admin bulk edit and products page fixes, plus live variation switching.