=== Sanestly Condition Manager for WooCommerce ===
Contributors: sanestly
Tags: woocommerce, product condition, item condition, schema.org, used products
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 11.0
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Assign product conditions (new, used, refurbished, open box, damaged) with storefront display and structured data.

== Description ==

Sanestly Condition Manager for WooCommerce lets store owners set a product condition at the store, product, and variation level. Shoppers see the effective condition on the product page, and concrete WooCommerce Offer structured data receives a matching Schema.org itemCondition when it is safe to add.

= Features =

* Five built-in conditions: New, Used, Refurbished, Open box, Damaged
* Store-wide default with per-product and per-variation overrides
* Clear distinction between "use store default / inherit" and explicit "No condition"
* Storefront display with configurable position and plain-text label
* Classic variation form updates without a full page reload
* Additive Offer structured data (does not replace existing schema)
* Quick Edit and Bulk Edit for parent products
* Optional product list column (off by default)
* WPML / Polylang: condition keys copied across product translations; labels via standard i18n
* Native settings under WooCommerce → Settings → Products
* Safe uninstall: data kept by default; optional exact-key cleanup per site

= Privacy =

This plugin does not send data to remote servers, does not set cookies, and does not load assets from a CDN. It stores only the condition settings option and optional product meta on your site.

== Installation ==

1. Upload the `sanestly-condition-manager` folder to `/wp-content/plugins/`, or install the ZIP via Plugins → Add New.
2. Activate the plugin through the Plugins screen (WooCommerce must be active for condition features).
3. Open WooCommerce → Settings → Products → Condition Manager to choose defaults and display options.
4. Edit products (and variations) to set overrides as needed.

== Frequently Asked Questions ==

= What happens when a product has no condition set? =

The store default from settings is used. If the store default is "No condition", nothing is shown on the product page and no itemCondition is added.

= How do variations inherit conditions? =

Each variation can inherit from the parent, set its own condition, or choose "No condition". Explicit "No condition" stops inheritance even when the parent or store default has a value.

= Why does Open box use UsedCondition in structured data? =

Schema.org does not define a separate OpenBox OfferItemCondition. Open box is mapped to https://schema.org/UsedCondition so search engines receive a valid enumeration URL.

= What is removed on uninstall? =

By default, nothing. If you enable "Delete data on uninstall" before removing the plugin, only this site's `sncm_settings` option and `_sncm_condition` product meta are deleted.

= Does this work without WooCommerce? =

The plugin will not fatal. Features stay dormant and administrators who can activate plugins see a notice until WooCommerce is available.

= Does this support multilingual stores (WPML / Polylang)? =

Yes. Condition keys (`new`, `used`, `refurbished`, `open_box`, `damaged`, `none`) are language-neutral and stored in `_sncm_condition`. Labels shown to shoppers and admins use WordPress translations (`__()` / `esc_html__`). The plugin ships `wpml-config.xml` (and Polylang/WPML filters) so `_sncm_condition` is **copied** across product and variation translations — not treated as free-text to translate. No custom translation UI is included.

== Screenshots ==

1. WooCommerce → Settings → Products → Condition Manager (store default, display position, label).
2. Product editor Condition field on the General tab.
3. Storefront product page showing the condition block.
4. Variable product: selecting a variation updates the displayed condition.

== Changelog ==

= 1.0.0 =
* Stable Free 1.0: product / variation conditions, storefront display, Offer itemCondition, Quick/Bulk Edit, HPOS-compatible.
* Multilingual: WPML / Polylang copy `_sncm_condition` keys; labels via standard WordPress i18n (POT included).
* Plugin Check: removed discouraged `load_plugin_textdomain()` (.org auto-loads the slug).

= 1.0.0-rc.1 =
* Release candidate: full Free 1.0 feature set for owner review.

== Upgrade Notice ==

= 1.0.0 =
Stable Free release. Condition meta remains language-neutral and is copied across WPML/Polylang product translations.
