=== bgready – AI Background Remover for WooCommerce ===
Contributors: codepower2026
Tags: woocommerce, background removal, product images, cutout, ecommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.6.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 8.0
WC tested up to: 11.2

AI background removal for WooCommerce product photos — cutouts, white/custom backgrounds, marketplace canvas. Not an image compressor.

== Description ==

**bgready – AI Background Remover for WooCommerce** is an AI cutout tool for product photography — it removes backgrounds from WooCommerce product images so you can publish clean cutouts, white or branded backdrops, and marketplace-ready canvases. It is **not** an image compression or “optimization” plugin: it does not resize/compress your media library to save disk space; it creates new cutout renders via [bgready Studio AI](https://bgready.com/).

* Bulk and automatic background removal when you save a product (featured / gallery images)
* White, transparent, or custom backgrounds plus marketplace-ready canvas (padding and output size)
* Soft shadows and optional watermarks on the rendered result
* Per-product overrides in the product meta box (Process / Reprocess / Restore); originals are always kept
* Signed job webhooks deliver results without waiting for WP-Cron (polling is only a fallback)
* WooCommerce → Settings → bgready: API key, defaults, live sample preview, catalogue reprocess
* Bulk action on Products and Media Library; new attachments named `<original>-nobg.png|jpg|webp`
* Respects API rate limits (429 Retry-After) and pauses on insufficient credits (402)

Requires a free or paid bgready account at [bgready.com](https://bgready.com/).

Operated by [Codepower OÜ](https://codepower.io/) (Estonia). Reviewer / ownership contact: info@codepower.io.

== External services ==

This plugin connects to the **bgready** service to remove backgrounds and render product images.

* **What is sent:** product image files you choose to process, render options (background, canvas, watermark, output size/format), and (when you use Test connection / Report a problem) shop URL, WordPress/WooCommerce/plugin versions, and optional feedback text. A signed webhook URL for this site is registered so results can be delivered.
* **When:** only after you save an API key and start a process / test / report action. No background telemetry or tracking.
* **Service:** https://api.bgready.com/ (and the API base URL you configure)
* **Terms of Service:** https://bgready.com/terms/
* **Privacy Policy:** https://bgready.com/privacy/

== Installation ==

1. Install from Plugins → Add New, or upload the `bgready-background-remover` folder to `/wp-content/plugins/`.
2. Activate the plugin (WooCommerce 8+ must already be active).
3. Open WooCommerce → Settings → bgready, paste your API key, and click **Test connection** (registers the signed callback).
4. Optionally enable automatic processing and tune customisation defaults.
5. Open a product and use the **Background removal (bgready)** meta box, or select products / media items and choose **Remove background (bgready)**.

**Upgrading from the private 1.5.x zip (`bgremove-for-woocommerce`):** activate this plugin, then deactivate and delete the old one. Your API key and settings are kept (same `bgremove_*` options). The REST callback path stays `/wp-json/bgremove/v1/callback`.

== Frequently Asked Questions ==

= Are original images deleted? =

No. Keep original is always on. Results are new Media Library attachments. Restore original switches the product slot back without deleting files.

= Does preview cost credits? =

Preview downloads are free (≤ ~500×500 px for square). Full-resolution output uses 1 credit per image.

= What happens when I run out of credits? =

The queue pauses and an admin notice links to the bgready pricing page. Resume after topping up.

= Why did nothing change after I saved a new colour? =

Existing products keep their old results until you reprocess. After saving settings, use **Reprocess catalogue** (or Reprocess on a product).

= Does this plugin track my shop? =

No. It only talks to bgready when you configure an API key and process images (or use Test connection / Report a problem). See External services above.

= Who operates this plugin? =

[Codepower OÜ](https://codepower.io/) (Estonia). Ownership / reviewer contact: info@codepower.io.

= I already installed the older “bgremove for WooCommerce” zip =

Activate this plugin from WordPress.org (or this zip). Settings migrate automatically. Then remove the old plugin folder.

== Screenshots ==

1. WooCommerce → Settings → bgready — API key, connection test, and Studio AI defaults
2. Customisation defaults — background, canvas, shadow, format, and live sample preview
3. Watermark options for free branding overlays
4. Product meta box — process, reprocess, restore, before/after
5. Bulk action on the Products list
6. Dismissible credit / queue notice when balance is low

== Changelog ==

= 1.6.5 =
* Fix: reliable webhook result delivery.

= 1.6.4 =
* Fix: coding-standard warnings.

= 1.6.3 =
* Fix: never activate or deactivate other plugins (legacy private zip must be removed manually).
* Fix: admin notices limited to plugin/settings/product/media screens; 402 credit notice is dismissible per user.
* Change: readme clarifies AI background removal / cutout (not image compression or optimization).

= 1.6.2 =
* Fix: never auto-replace product images when Output is Preview (preview stays as an extra Media Library attachment only).
* Change: new installs default Output to Full so catalogue photos stay high-resolution.

= 1.6.1 =
* Fix: watermark position grid honours every cell (avoid-subject no longer teleports marks to top-left on full-bleed products — server + editor; shared with Shopify).
* Fix: QA hardening for settings watermark panel, metabox overrides, and upgrade from 1.5.x.
* Change: Author Codepower OÜ (https://codepower.io/); Plugin URI https://bgready.com/.
* Maintenance: private zip and WordPress.org package rebuilt from the same 1.6.1 source.

= 1.6.0 =
* Add: WordPress.org package slug `bgready-background-remover` with text domain match; settings migrate from 1.5.x.
* Add: External services disclosure (Terms + Privacy) on settings and in readme.
* Change: Plugin display name “bgready – AI Background Remover for WooCommerce”.
* Change: WC tested up to 11.2; Tested up to WordPress 7.1.
* Fix: Legacy API-base notice is dismissible.

= 1.5.2 =
* Maintenance release of the private zip line.

= 1.5.1 =
* Change: user-facing brand strings say bgready (plugin folder/slug unchanged for updates).

= 1.5.0 =
* Change: default API base URL is https://api.bgready.com/api/v1 (legacy host still works).
* Add: settings notice with one-click “Switch to api.bgready.com” when the legacy base is configured.
* Change: pricing / docs links point at bgready.com.

= 1.4.1 =
* Add: bgready preset dropdown — send a named render preset via preset id.

= 1.4.0 =
* Add: Stock background picker (curated gallery via API).

= 1.3.0 =
* Add: Watermark settings (none / preset / custom) with position grid, opacity, size, margin, rotation, and tile.

= 1.2.1 =
* Fix: callback URL for plain permalinks; webhook test hardening; catalogue progress counts.

= 1.2.0 =
* Add: signed job webhook callback; catalogue reprocess; live sample preview improvements.

= 1.1.0 =
* Add: automatic processing and customisation defaults.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.6.5 =
Reliable webhook result delivery (durable job map; no lost results after transient eviction).

= 1.6.4 =
Coding-standard clean-up for Plugin Check / PHPCS (no behaviour change).

= 1.6.3 =
wp.org review fixes: no plugin auto-deactivation; quieter admin notices; clearer AI cutout positioning.

= 1.6.2 =
Preview + auto-replace no longer overwrites product images. Existing Output setting is kept.

= 1.6.1 =
Watermark position fixes and QA hardening. Same settings as 1.6.0.

= 1.6.0 =
WordPress.org slug rename. Settings from 1.5.x are kept. Deactivate the old private zip after activating this version.
