PayPal Promocode Plugin

Paypal Promocode Plugin – version 1.5.6

NOTE: There is currently limited support for this plugin.

The PayPal PromoCode plugin allows you to create custom PromoCodes for your PayPal Buttons. The buttons must be created using the NEW BUTTON option from this plugin in order for PromoCodes to work with them.

This plugin is NOT intended for sites that already have PayPal buttons and are only looking to add promocode functionality, as the promocodes will not be integrated into the buttons and no discounts will be applied. Currently, hosted PayPal buttons will not work. PromoCodes are not case sensitive.

This plugin documentation is not 100% complete.


(use test as a promocode to test the buttons. DO NOT actually purchase something, as these are LIVE test buttons and you will have a charged if you do. Please contact me if you actually DID complete the PayPal checkout and I will refund any test amount.)


Types of Buttons Allowed
Currently, this plugin only allows for Buy Now, Pay Now, Donation and Add to Cart buttons.
NOTE: There is some functionality for Subscription buttons in the code, but it has NOT been tested and you will have to modify the code yourself to accomplish this. Hopefully in a future update it will be turned on. If you MUST to use a subscription button and you do not know basic programming in PHP and do not know how to modify a plugin, then this plugin is NOT for you. This is basically an unsupported plugin, which means that any requests for changes or modifications will be replied with an estimate of the cost to achieve the desired functionality. If you are having a problem, I’ll try to help out is time allows, but I am very busy and free projects are at the very bottom of my priority list. If you can wait a bit, it may eventually be added to the plugin core.

Adding Buttons to Pages/Posts/Widgets
PayPal PromoCode allows you to easily add your buttons to a Post, a Page or a text Widget in the sidebar by using a place-holder shortcode ( i.e., [pppromo=1] ).

For Pages/Posts: Once you create the button, copy the code for the button and paste it into the editor for the Page/Post you want the button and update. There is no need to place the code in the HTML View section, as long as you do not format it in the Visual WYSIWYG mode. You can add as many buttons as you want to a page and you can add the same button in several places if you choose to do so (great for long posts or multi-page posts).

For Widgets: Add a new TEXT Widget to your sidebar (or use an existing one) and paste the button code in the textarea and save.

Remember: If you add a new button and want a specific promocode to work with it, you must add that button to the promo code button list – newly created buttons are not added to promocodes automatically.

Adding a View Cart Button
If you are using Add To Cart buttons, you can add a View Cart button any where you like. The shortcode to add the view cart button is [pppviewcart] an can be placed any where you can add the shortcode for buttons (Pages/Posts or Widget textarea).

Adding Promo Codes
Click the Add New Promo Code in the menu and enter all the information. (more information coming soon)

Using Promo Codes
PromoCodes can be used two ways, either by telling the customer to use PromoCode YourCodeName (this would be whatever name you give it) or by adding the & or ? and pppcode=YourCodeName to the end of the url that you want to direct customers to. For example: would take them to the home page of your site and set the PromoCode session. Now when they visit any page that has a button that was created using this plugin, the PromoCode will be applied (granted the promo code applies to that button).

Promo Code Tracking
Basic Promo Code Tracking (the number of times a promo code is used) is from version 1.5.2 forward.

Using your own Styles
This plugin uses a default style sheet. If you wish to use your own styles, simply copy the pppcode-styles.css file from the plugin directory and place it in your theme directory. Then edit the styles as you need to. This will keep the styles intact should you upgrade in the future.

The latest version (1.5.6) , uses the WordPress list styles for the admin section to show the buttons and promo codes for better integration.  Additionally, there is a lot more help text – now located in the contextual help menu on each plugin page. Below are some screenshots of the new version:

You can download the latest version here (1.5.6  – there is no 1.5.3 or 1.5.5 as they were a testing only versions).

Version 1.5.4 does not add any new features, it just cleans up the plugin making it compatible with WordPress 3.5.1 and eliminates some deprecated user levels and calls.

A new shortcode was also added to help with the buttons for future updates. The shortcode [paypalpromo id=1] (where id is the button id), will work now as well as the older shortcode.