Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/raifd/aw-customer-generate-coupon-restricted/releases/download/v1.0.6/aw-customer-generate-coupon-restricted.zipAdds a new AutomateWoo variable that generates a unique coupon, optionally restricted to the customer’s email address. Built for WooCommerce merchants who want more control over coupon usage in automated workflows.
🚀 Features
- New variable:
{{ customer.generate_coupon_restricted }} - Works just like
customer.generate_coupon, but with a checkbox to restrict usage - Email restriction enforced via WooCommerce coupon settings
- Fully compatible with coupon templates and parameters
🛠 Usage
-
Activate the plugin in WordPress.
-
Create or edit an AutomateWoo workflow that uses a
customerobject (e.g. “Review Posted” or “Order Created”). -
Add a “Send Email” or “Add Note” action.
-
Use this variable:
{{ customer.generate_coupon_restricted template: 'your-template' use_email_restriction: 'yes' }} -
Or insert it from the variable picker and enable the checkbox for email restriction.
🧩 Example Workflow
Trigger: Customer leaves a product review
Action: Send a thank-you email with a discount code limited to their email address
🔧 Installation
- Upload the plugin folder to
/wp-content/plugins/ - Activate it via the WordPress admin
- The variable will automatically be available in AutomateWoo workflows under the
customersection
💡 Why This Exists
AutomateWoo’s default coupon variable doesn't include built-in support for email restriction. This plugin extends that functionality for a common use case: personalized, one-time-use coupons.
🧠 Credits
Developed by Raif Deari
Built with the help of ChatGPT for prototyping, debugging, and WooCommerce integration guidance.
📄 License
This plugin is licensed under the GNU General Public License v2.0 or later.
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.