Unique Coupons

Distribute unique coupons to your users.

Author:Josef Wittmann (profile at wordpress.org)
WordPress version required:5.3
WordPress version tested:5.7.2
Plugin version:0.1.3
Added to WordPress repository:06-05-2021
Last updated:13-05-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://wordpress.org/plugins/unique-coupons/
Total downloads:472
plugin download
Click to start download

Allows you to upload a set of coupon codes you want to distribute to your users. Each coupon is assumed to be used only once.

You can manage multiple sets of coupons from different sources.

Your users are shown a popup next time they visit the site. They have are only shown the coupon after clicking a button, to ensure interest.

Usage

After installing, you’ll find a new menu item in the admin area near the bottom called ‘Coupons’. All administration is done from there.

There are coupons and (coupon) groups.
Each coupon belongs to exactly one group and has a value and expiry date.
A group contains many coupons and defines the template that is shown to the users within a popup. By default, only logged in users can get coupons.

Start by creating a new group. Give it an unique name and write out the template.
There are four buttons in the editor, which mark the speical areas for the popup. Highlight the according text and press the button to mark it up.

  • Action button: When this button is clicked, the coupon’s value will be fetched from the backend and displayed.
  • Success area: This area is hidden until the coupon is fetched from the backend.
  • Coupon value: This area will be replaced with the coupon’s value. Make sure to not include trailing whitespace, otherwise it may look ugly.
  • Expiry date: This area will be replaced with the coupon’s expiry date. Make sure to not include trailing whitespace, otherwise it may look ugly.

Save the group and add some coupons. You can add multiple coupons with the same expiry date. Just make sure that every coupon gets its own line (empty lines are ignored).

Now you’re ready to go. But you may want to have a look at the default settings. There you can adjust delays between events to not spam your users.

Customization

Most of the user-facing customization can be done in the group editor. If you want to change the users which should be able to get coupons, you can hook into the unique_coupons_user_is_authorized_for_coupons filter. Currently, there is no way to distribute coupons to anonymous users (keeping track is done server-side). So even if you allow this through this filter, it will not work.

Shortcomings/Bugs

  • For now, data from this plugin will stay around after deleting it.
  • You can’t explicitly filter when the popup shouldn’t be shown. The best workaround is to hook into unique_coupons_user_is_authorized_for_coupons.

Contributing

The source code is hosted on Josef37/unique-coupons.
Feel free to create a new issue, when you have questions or feature requests, or consider making a pull request.
There is a separate developer README, which helps you set up the development environment.

If this plugin helped you in any way, I’d like to hear your feedback.


Screenshots
ChangeLog