=== EEZZ Friend Coupons for WooCommerce ===
Contributors: daijianpu
Tags: woocommerce, coupons, coupon exchange, marketing, shortcode
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight coupon exchange links for trusted WooCommerce store owners.

== Description ==

EEZZ Friend Coupons for WooCommerce helps trusted WooCommerce store owners exchange coupon offers without using a central platform.

A store owner creates a My Coupon offer that is connected to a native WooCommerce coupon. The plugin generates a stable JSON link. A friend can import that JSON link in their own store, then display the imported offer with:

[eezz_friend_coupons]

The storefront shortcode only reads locally saved friend offers. It does not request friend websites during frontend page views.

When a visitor clicks an imported friend offer, the plugin sends the visitor to the original store's claim endpoint. The selected WooCommerce coupon can then be remembered and applied automatically during checkout. Visitors do not need to manually type a coupon code.

This plugin does not automatically insert frontend content. Add the shortcode wherever you want friend coupon cards to appear, such as a Thank You page, a regular page, or a custom landing page.

Privacy and boundaries:

* Requires WooCommerce.
* Built for trusted WooCommerce friends.
* Does not connect to a central platform.
* Does not create an affiliate, payout, commission, marketplace, or ad network system.
* Does not synchronize customer data.
* Does not synchronize order details to friends.
* Does not upload customer names, emails, phone numbers, addresses, IP addresses, or User-Agent values.
* Only administrators importing or refreshing a friend JSON link request that JSON URL.
* If the imported JSON contains an offer image, the plugin downloads that image into the local WordPress Media Library during import. The storefront shortcode only displays local Media Library images or a local placeholder. It does not load images directly from friend websites during frontend page views.
* Uses a cookie to remember a pending friend coupon for 7 days.
* The cookie stores a public offer key, coupon code, source friend site id, and timestamp. It does not store personal identity information.
* Version 1.0 does not include display monitor tracking.
* Version 1.0 does not include impression tracking or CTR.

== Installation ==

1. Upload the plugin folder to wp-content/plugins.
2. Activate EEZZ Friend Coupons for WooCommerce.
3. Make sure WooCommerce is installed and active.
4. Create and configure a published coupon in WooCommerce > Marketing > Coupons.
5. Go to EEZZ Friend Coupons > My Coupon.
6. Select that WooCommerce coupon, configure your offer card, and save it.
7. Copy the generated JSON link and share it with trusted WooCommerce friends.
8. Import friend JSON links on the Friend Coupons tab.
9. Display imported friend offers with [eezz_friend_coupons].

== Frequently Asked Questions ==

= Does the shortcode request friend websites? =

No. The shortcode only reads locally saved imported offers. Friend websites are only requested when an administrator imports or refreshes a friend JSON link.

= Do I need to share the claim link separately? =

No. Share only the JSON link. The claim URL is included inside the JSON and is used automatically by the plugin.

= Do customers need to manually enter a coupon code? =

No. The plugin is designed to remember the selected offer and apply the connected WooCommerce coupon automatically when possible.

= Does the plugin track impressions or CTR? =

No. Version 1.0 only records outgoing clicks, incoming claims, coupon uses, and orders as daily aggregates.

= Does the plugin store customer personal data? =

No. It does not store customer names, emails, phone numbers, addresses, IP addresses, or User-Agent values.

= Can the claim target URL point to another website? =

No. The target coupon URL must be on your own site.

= Is this an affiliate or commission plugin? =

No. This plugin does not manage affiliate accounts, payouts, commissions, referral fees, or marketplace relationships.

= Can I use this with any WooCommerce coupon type? =

The offer is connected to a native WooCommerce coupon. You can use the WooCommerce coupon settings to configure the real discount rules. The offer badge text shown on the card is only display text.

== Changelog ==

= 1.0.4 =
* Improve My Coupon admin wording for display-only offer badge text.
* Hide the internal claim link from the My Coupon admin screen to reduce confusion.
* Add locked editing for saved My Coupon offer settings to help prevent accidental changes.
* Fix mbstring compatibility for offer field length checks.
* Harden order attribution validation for external friend site ids.

= 1.0.3 =
* Fix database upgrade trigger after schema length changes.
* Expand hard refresh validation for invalid remote JSON and claim URLs.
* Improve disabled My Offer admin messaging.

= 1.0.2 =
* Final beta hardening for claim/session attribution, order tracking, database upgrade safety, and protocol validation.

= 1.0.1 =
* Review fixes for friend offer state, claim attribution, refresh identity checks, and coupon validation.

= 1.0.0 =
* Initial release.
