Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 5.06 KB

README.md

File metadata and controls

64 lines (46 loc) · 5.06 KB

Humanity Donations

This plugin leverages WooCommerce to provide support for individual and recurring, fixed and variable price donations.

Minimum Requirements

This plugin requires:

  • WordPress 5.8+
  • PHP 8.2+ with the Intl extension
  • Humanity Theme v1.0.0+

Required Plugins

Companion Plugins

Usage

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.

One-off Donations

For fixed-price, one-off donations, create a variable product, and then follow the below process:

  1. 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:
  2. Create variations from the attribute, and specify the price for each option.
  3. 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.

Recurring Donations (Subscriptions)

Create a variable subscription product, and follow the same process for One-off Donations.

Donations Gutenberg Block

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:

  1. create a select field type (this is very important), and give it an appropriate label
  2. 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
  3. 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:

Governance

See GOVERNANCE.md for project governance information.

Changelog

See CHANGELOG.md or Releases page for full changelogs.

Contributing

For information on how to contribute to the project, or to get set up locally for development, please see the documentation in CONTRIBUTING.md.

Special Thanks

We'd like to say a special thank you to these lovely folks:

              Cure53                                     WP Engine                      
Cure53 WP Engine

Want to know more about the work in other Amnesty GitHub accounts?

You can find repositories from other teams such as Amnesty Web Ops, Amnesty Crisis, Amnesty Tech, and Amnesty Research in their GitHub accounts

AmnestyWebsiteFooter