There are lots of Paypal plugins for WordPress available free from the WordPress repository but none seem to do quite what I wanted for one of my websites. So it was time to sit down and put together my own plugin to do what I needed. This plugin is available to download if you want to use it on your own site.
This plugin is useful for raising funds for projects and offers the chance for people to donate or sponsor on a monthly basis as well as make a one-off donation. The plugin is also responsive for mobile which is important with so much web traffic now being through mobile devices.
Ongoing recurring donations or one-off donations in WordPress plugin
The default styling for the plugin is pretty basic to allow you to use CSS to style the donation form how you want it. A shortcode is used to produce the form on your website.
The simplest way to use the plugin is to fill in the settings page and then simply call the [ ddpay ] shortcode.
The default settings allow you to set:
- the Paypal email account for payment to be made into,
the currency symbol to show on the form,
- the Paypal currency abbreviation to set the currency payments,
- set up to 3 recurring monthly donation amounts,
- Project or fund name.
Simple shortcode donations plugin
You can change the shortcode defaults on each use by using attributes. This means you can set a new donation form for each project that you use, change the PayPal account that sponsorship is paid into and also change the monthly recurring payments.
A potential shortcode using these attributes would look like:[ ddpay paypaladd=”email@example.com” recurring_amt1=”1.50″ recurring_amt2=”5.00″ recurring_amt3=”10.00″ item_name=”Band Sponsorship” ]
It is possible to add more than one donation or sponsorship form on each page though I would recommend at most 1 form on a page plus 1 form in the sidebar. You can see a donation form below and a second one in the widget area.
Example of the Simple Paypal Support shortcode in the widget area.
PayPal donations for WordPress sites
The plugin uses standard Paypal options for taking payments rather than the donations option because of the difficulty in getting payment from Paypal if you are not a registered charity.
So the “once only donation” is put through as a purchase and the “recurring donations” is dealt with as a subscription. This means you only need a verified account to use this plugin effectively.
Minify plugins issue
The tabs use html comments to operate. Some minify plugins will strip our html comments and then you will lose the tab feature. Please make sure that html minification is switched off in your minify or cache plugin to get the tab feature to work.