=== Evendeals ===
Contributors: zahid47
Tags: purchasing power parity, parity pricing, country-based pricing, geo pricing, international discounts
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show geo-based purchasing power parity discounts to international visitors. One-click setup.

== Description ==

Evendeals automatically detects your visitors' country and shows them a fair, purchasing-power-parity discount — increasing international conversions without manual coupon management.

**Features:**

* One-click setup — no code editing required
* WooCommerce integration — auto-create and rotate coupon codes in your store
* Shortcode for custom placement — `[evendeals]` or `[evendeals type="coupon"]`
* Lightweight — single external script, deferred loading

**How it works:**

1. The plugin loads a small script (`banner.js`) from Evendeals.
2. The script detects the visitor's country and checks your Evendeals dashboard rules.
3. If a discount applies, a banner, popup, or inline element displays the offer.

All configuration (discounts, coupons, page targeting, display settings) is managed on your [Evendeals dashboard](https://www.evendeals.com/dashboard).

Evendeals is a hosted service. When enabled, this plugin loads `banner.js` from Evendeals and checks `https://www.evendeals.com/api/discount` using the current page URL. The script may use browser local storage or session storage for timers and popup dismissal state. See the [Evendeals privacy policy](https://www.evendeals.com/privacy) and [terms](https://www.evendeals.com/terms).

== Installation ==

1. Upload the `evendeals` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Settings → Evendeals** and check **Show discounts to visitors**.
4. Set up your discounts on [evendeals.com/dashboard](https://www.evendeals.com/dashboard).

== Frequently Asked Questions ==

= Do I need an Evendeals account? =

Yes. Create a free account at [evendeals.com](https://www.evendeals.com) and configure your discount rules there. The plugin connects your WordPress site to your Evendeals dashboard.

= What does the shortcode do? =

`[evendeals]` renders placeholder elements that `banner.js` fills with country name, discount amount, coupon code, and country flag. Use `[evendeals type="coupon"]` to render only the coupon code, for example.

Valid types: `country`, `discount`, `coupon`, `flag`.

= Does this slow down my site? =

No. The script is loaded with `defer` and is served from a CDN.

= Does this work with WooCommerce? =

Yes. If WooCommerce is active, the plugin shows setup instructions on the settings page. Connect your store via the [Evendeals Integrations page](https://www.evendeals.com/dashboard/integrations) using your WooCommerce REST API keys. Evendeals will automatically create, rotate, and track coupon codes in your store.

= Can I control which pages show discounts? =

Yes. Configure page targeting in your [Evendeals dashboard](https://www.evendeals.com/dashboard) using the "Where to display" section.

== Changelog ==

= 1.1.3 =
* Use a plugin-specific Plugin URI.

= 1.1.2 =
* Update WordPress.org submission metadata.
* Add hosted service disclosure.

= 1.1.1 =
* Add WooCommerce setup guidance.
* Add shortcode placeholders for custom placement.
* Improve script loading.

= 1.0.0 =
* Initial release.
