=== NS Watermark For WooCommerce ===
Contributors: nsthemes
Tags: woocommerce, watermark, image, photo, product image
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 4.0.0
WC requires at least: 7.0
WC tested up to: 10.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Protect your WooCommerce product images by overlaying a watermark on-the-fly — no permanent changes to your files.

== Description ==

**Apply your watermark on your WooCommerce product images — without overwriting them!**

NS Watermark For WooCommerce overlays a watermark image on top of your shop and single-product photos at display time.
The original files stored in your Media Library are never modified.

**Features (free version)**

* Choose any image from your Media Library as the watermark.
* Always show the watermark, or show it only to guests (not logged-in users).
* Enable / disable with a single setting.
* Compatible with WordPress 7.0 and WooCommerce 10.8.1.
* No GD extensions need to be installed separately (bundled with PHP ≥ 7.4).

**3rd Party / External Services**

* **PluginEye** — used for opt-in usage tracking (plugin activation/deactivation events, site address, WordPress version, active plugin list). Data is collected only after explicit user consent is given on the opt-in screen shown at first activation. Read more: [Privacy Policy](https://www.plugineye.com/privacy-policy/) — [Terms of Service](https://www.plugineye.com/terms-of-service/). This service is provided by NsThemes.

All watermark image processing is performed locally on your web server using PHP's built-in GD library. No image data is sent to external servers.

== Installation ==

1. Upload the `ns-woocommerce-watermark` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **NS Watermark → Settings** in the admin sidebar.
4. Select your watermark image and choose your visibility setting.
5. Save changes — your product images will now display with the watermark.

== Frequently Asked Questions ==

= Is WooCommerce required? =
Yes, WooCommerce must be installed and active.

= Does this plugin modify my original images? =
No. The watermark is composited on-the-fly at display time. Your files in the Media Library remain untouched.

= What image formats are supported? =
JPEG, PNG, GIF, and WebP for both the source image and the watermark.

= Does it require `allow_url_fopen`? =
No. Version 4.0.0 reads images from the local filesystem, so `allow_url_fopen` is not needed.

= Will the watermark URL leak the original image path? =
No. The AJAX endpoint that serves watermarked images is nonce-protected and only accepts URLs that belong to your own WordPress installation.

== Screenshots ==

1. Settings page.
2. Watermark on a single product page.
3. Watermark on the shop / category page.

== Changelog ==

= 4.0.0 =
* Complete security rewrite.
* Removed the publicly accessible `ns_image.php` endpoint — watermarks are now served through a nonce-verified WordPress AJAX handler.
* Added SSRF/open-redirect protection: only images stored on the same WordPress installation are accepted.
* All output is now properly escaped; all input is sanitized and validated.
* Declared compatibility with WooCommerce HPOS (High-Performance Order Storage / custom_order_tables).
* Updated: requires WordPress 6.0+, PHP 7.4+, WooCommerce 7.0+.
* Tested up to WordPress 7.0 and WooCommerce 10.8.1.

= 3.0.0 =
* Integrated PluginEye tracking.
* Security bug fix.

= 2.11.5 =
* Minor bug fix.

== Upgrade Notice ==

= 4.0.0 =
Major security update. The old `ns_image.php` direct-access endpoint has been removed and replaced with a secure WordPress AJAX handler. Please update immediately.
