=== Popup Coupon Generator for WooCommerce ===
Contributors: marcodedo, magentacomunicazione, wpguruit, themeinthebox
Tags: woocommerce, popup, coupon, automation, newsletter
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Smart popups and automatic coupons for your WooCommerce store.

== Description ==

**Popup Coupon Generator for WooCommerce transforms your WooCommerce site with smart popups and personalized automatic coupons.**

Create effective popups with advanced display conditions (exit intent, time delay, scroll percentage, or page load) and send unique coupons to each subscriber via automated emails.

Perfect for online stores that want to increase subscriptions, conversions, and sales without complications.

Themeinthebox is not affiliated in any way with WooCommerce. The plugin developed simply helps to better manage certain functionalities.

= Main Features =

* Built-in popup builder with WordPress editor
* Flexible display conditions (exit intent, time delay, scroll percentage, page load)
* Support for newsletter form shortcodes (Contact Form 7, MailPoet, or any form plugin)
* Automatic generation of unique coupon codes for each subscriber
* Personalized automated emails with included coupons
* Basic statistics on opens, clicks, and conversions
* Simple integration with WooCommerce
* Google Analytics integration (optional)
* GDPR compliant without cookie usage

= Who is it for? =

* WooCommerce store owners who want to increase newsletter subscriptions
* Marketers looking for simple automations for personalized coupons
* Developers who want a lightweight and configurable solution
* Those who want effective popups without slowing down the site

== Installation ==

= Automatic Installation =

1. Access the WordPress dashboard
2. Go to Plugins > Add New
3. Search for "Popup Coupon Generator for WooCommerce"
4. Click "Install Now" and then "Activate"

= Manual Installation =

1. Download the plugin ZIP file
2. Go to Plugins > Add New > Upload Plugin
3. Select the ZIP file and click "Install Now"
4. Activate the plugin

= Initial Configuration =

1. Go to Popup Coupon Generator > Popups in your WordPress admin
2. Create a new popup and add your content using the WordPress editor
3. Set display conditions (e.g., exit intent, time delay, scroll percentage)
4. Add a newsletter form shortcode (from Contact Form 7, MailPoet, or any form plugin)
5. Create an email automation in Popup Coupon Generator > Automations
6. Link the automation to your popup
7. Activate the popup and check statistics to optimize campaigns

== Frequently Asked Questions ==

= Do I need Elementor or other page builders? =

No, the plugin includes its own popup builder with a WordPress editor. You can create popups directly in the plugin settings without needing external builders.

= How does coupon generation work? =

Each automated email sent generates a unique coupon code linked to the individual subscriber, usable in the WooCommerce store. Coupons are automatically created in WooCommerce with the settings you configure in the automation.

= Is the plugin compatible with all WooCommerce versions? =

The plugin is tested with WooCommerce 4.x and later versions up to version 7.x.

= Is it GDPR compliant? =

Yes, the plugin does not use cookies to track users and manages sessions and automations in a GDPR-compliant manner.

= Can I customize the emails sent to customers? =

Yes, you can customize email subject and content in the automation settings. The plugin uses WordPress's built-in wp_mail() function and supports HTML email templates with placeholders for coupon codes, customer names, and shop URLs.

= Can I use form plugins like Contact Form 7 or MailPoet? =

Yes, the plugin supports any form plugin that provides shortcodes. Simply add the form shortcode in the popup settings, and the plugin will display it in the popup.

== Screenshots ==

1. Popup configuration screen in the WordPress admin.
2. Example of automated email with unique coupon code.
3. Basic statistics of email campaigns.

== Changelog ==

= 1.3.0 =
* **Design:** 3×3 viewport placement, CSS width/min-height and border radius; optional tablet/mobile width and min-height overrides; panel background color; overlay color and opacity; option to block closing via dimmed overlay or Esc (close button still works); optional page scroll lock while the popup is open; popup box aligns flush to screen edges (no extra inset margin).
* **Admin:** “Contacts” admin screen relabeled **Subscriptions** (menu slug unchanged); **Manage** link on the Plugins list points to the main plugin screen; misc. English source strings and button labels for the popup editor.
* **Languages:** Italian, Spanish, German, and French `.po`/`.mo` packs aligned with the plugin text domain.

= 1.2.0 =
* **ALTCHA (optional):** plugin-form setting to add the open-source ALTCHA proof-of-work widget; challenge endpoint and server-side verification; bundled widget script with CDN fallback.
* **Plugin form:** configurable extra fields (stored per popup); values saved on subscribe in a new `custom_fields` JSON column (`popucoge_db_version` 3 migration).
* **Subscriptions:** “Details” column (dashicons) opens a modal with standard fields plus all custom form values; CSV export adds a “Custom fields (JSON)” column.
* **Popup editor:** “Salva e chiudi” returns to the list; “Salva e continua” saves and stays on the edit screen.
* **Admin UI:** tab panels no longer overlap when switching tabs / form source (removed conflicting jQuery display toggles; CSS hardening).

= 1.1.0 =
* **Subscriptions:** new admin screen listing subscribers (name, email, popup/form, date, status) with **CSV export** (Name, Email, Form) for tools like Brevo, Mailchimp, MailerLite, GetResponse.
* **Database:** `popup_id` in the subscribers table is now `varchar` so popup keys are stored correctly; automatic migration on upgrade (`popucoge_db_version`).
* **Popup targeting (Elementor-style):** display conditions — Entire site, Archives, Singular, WooCommerce (shop, product, cart, checkout, account, order received).
* **Triggers:** page load (delay), scroll (percentage + direction), scroll to element (HTML id), click (CSS selector), after inactivity, exit intent. Legacy `display_type` settings are migrated when loaded.
* **Advanced rules (frontend):** minimum page views and sessions, maximum lifetime shows, max shows per session, device targeting (desktop/tablet/mobile), browser targeting.
* **Audience:** optional referrer substring rules (one per line); option to hide popups for logged-in users.
* **Admin:** tabbed popup editor (General, Display conditions, Triggers, Advanced rules, Audience); list column shows trigger and display summary.
* **Performance:** frontend scripts and styles load only when at least one active popup matches the current page and rules.

= 1.0.0 =
* Initial version with basic features:
  - Popups with customized display conditions (exit intent, time delay, scroll, page load).
  - Support for newsletter form shortcodes.
  - Automatic generation of unique coupon codes.
  - Automated email sending for new subscribers.
  - Statistics on opens and conversions.
  - WooCommerce compatibility and GDPR compliance.
  - Google Analytics integration (optional).

== Upgrade Notice ==

= 1.3.0 =
Adds rich **Design** controls (layout, colors, overlay, scroll/close behavior) and UI/i18n updates. Existing popups get sensible defaults; review **Design** on each popup if you need custom overlay or placement.

= 1.2.0 =
Adds optional ALTCHA, subscriber custom-field storage and Subscriptions “Details”, save-and-continue buttons, and a database migration for `custom_fields`. New signups store extra fields; existing rows keep prior data until updated.

= 1.1.0 =
Adds Subscriptions with CSV export, expanded popup display/trigger/advanced rules, and a subscribers table migration. Re-save popups if you rely on form names in Subscriptions for older leads.

= 1.0.0 =
First stable release of the Popup Coupon Generator for WooCommerce plugin.

== Arbitrary section ==

For technical support or special requests, contact Magenta Comunicazione via https://www.magentacomunicazione.it/
