Skip to content
Displays a banner at the top of your site that offers Purchasing Power Parity for the country your customers are visiting from should a coupon for the detected country be available.
PHP JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

WooCommerce Purchasing Power Parity Coupon Banner

License GitHub forks

Follow me

💻 Website 🐦Twitter

🔔 Overview

⚠️This project has not been touched since 1st October 2018 and has not been recently tested. Some corrections or tweaks maybe be needed due to changes made in WooCommerce since the development of this project. Use at your own risk ❗

Displays a banner at the top of your site that offers Purchasing Power Parity for the country your customers are visiting from should a coupon for the detected country be available.

How does it work?

The first time you visit the site at the time of activation, a search is conducted to look for coupons that are restricted by billing and country set under Usage Restrictions when the coupon was made.

When a coupon is found, two cookies 🍪 are saved with an expiration period of 7 days unless the coupon has an expiration date set which will then set the cookie for how long the coupon has left before it expires and the banner is displayed by sliding down.

The cookies are then used to load the banner instantly the next time rather than the need to do any Ajax requests again when the customer views any other page on the site or refreshes the page.

The customer can also dismiss the banner which sets another cookie to hide any attempts to display it again for 1 day.

If the customer is on the cart or checkout page and a coupon is available then the coupon is automatically applied.


To use this plugin you will need:

💽 Installation

  1. Download a .zip file with the latest version.
  2. Go to WordPress Admin > Plugins > Add New.
  3. Click Upload Plugin at the top.
  4. Choose File and select the .zip file you downloaded in Step 1.
  5. Click Install Now and Activate the plugin.

📘 Configuration Guide

1. Creating a Coupon

Go to WooCommerce -> Coupons and then either add a new coupon or edit one you have created previously.

2. Restrictions

Once you have a coupon setup, go to Usage Restrictions section of coupon data. Make sure you have Use location restrictions checked and Address for location restrictions set to Billing.

3. Country

Search and select a single country the coupon is for and then Publish.

💻 Development

  1. Clone the GitHub repository:
  2. Browse to the folder in the command line.
  3. Run the npm install --only=dev command to install the plugin's dependencies within a /node_modules/ folder.
  4. Run the npm install grunt command to install Grunt.


grunt or grunt test will check for JavaScript errors and text domain issues.

grunt dev will do a search and replace, minify JavaScript and update the POT file.

grunt zip will create a deployable plugin zipped up and ready to upload and install on a WordPress installation.

📝 Reporting Issues

If you think you have found a bug in the plugin, please open a new issue and I will do my best to help you out.


If you or your company use WooCommerce Purchasing Power Parity Coupon Banner or appreciate the work I’m doing in open source, please consider supporting me directly so I can continue maintaining it and keep evolving the project.

You'll be helping to ensure I can spend the time not just fixing bugs, but keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.

Please also consider starring and sharing 👍 the repo! This helps the project getting known and grow with the community. 🙏

I accept one-time donations and monthly via

  • My PayPal
  • Bitcoin (BTC): 3L4cU7VJsXBFckstfJdP2moaNhTHzVDkKQ
  • Ethereum (ETH): 0xc6a3C18cf11f5307bFa11F8BCBD51F355b6431cB
  • Litecoin (LTC): MNNy3xBK8sM8t1YUA2iAwdi9wRvZp9yRoi

Thank you for your support! 🙌


WooCommerce Purchasing Power Parity Coupon Banner is released under GNU General Public License v3.0.


WooCommerce Purchasing Power Parity Coupon Banner is developed and maintained by Sébastien Dumont.

You can’t perform that action at this time.