This plugin leverages WooCommerce to provide support for individual and recurring, fixed and variable price donations.
This plugin requires:
- WordPress 5.8+
- PHP 8.2+ with the Intl extension
- Humanity Theme v1.0.0+
The quickest way to get started using the plugin is to download the zip of the latest release, and install it via upload directly within WP Admin -> Plugins.
For fixed-price, one-off donations, create a variable product, and then follow the below process:
- Create a custom attribute, and define the values (separated by a
|
pipe character) for each of the donation amounts you would like the user to be able to choose from. Ensure that you select the used for variations option: - Create variations from the attribute, and specify the price for each option.
- For each variation, ensure that it is a) enabled, and b) virtual. For a donation of a custom amount, select the name your price field:
You may create as many donation products as you like, and insert them into pages via use of the donation Gutenberg block. Having multiple donation products means that you can create products for different campaigns or calls to action that you wish to accept donations for.
Create a variable subscription product, and follow the same process for One-off Donations.
The donation block supports adding either donations, subscriptions, or both. If both a donation and a subscription are added to the block, it will show the user an option to toggle the form between one-off and recurring donations.
To add the option for a user to choose a specific target campaign/fund for their donation, you will need to create a checkout field using WooCommerce Checkout Manager. Visit WooCommerce Settings -> Checkout -> Additional to create your field; then:
- create a select field type (this is very important), and give it an appropriate label
- create as many options within this field as you wish - one for each desired campaign/fund that you'd like the user to be able to support
- this field, once saved, can then be used within a donation block - the block will retrieve its label and options automatically once you have told it which field to use. You can see an example here:
See GOVERNANCE.md for project governance information.
See CHANGELOG.md or Releases page for full changelogs.
For information on how to contribute to the project, or to get set up locally for development, please see the documentation in CONTRIBUTING.md.
We'd like to say a special thank you to these lovely folks:
Cure53 | WP Engine |
---|---|
You can find repositories from other teams such as Amnesty Web Ops, Amnesty Crisis, Amnesty Tech, and Amnesty Research in their GitHub accounts