View my basket

UK Gift Aid & Donations for WooCommerce

5.00 out of 5
(7 customer reviews)

Add a UK Gift Aid consent checkbox to any WooCommerce checkout. Enable site-wide or for specific products. Accept donations from anywhere on your site, including at the checkout.

Licences for this plugin need to be renewed each year

SKU: N/A Category: Current: 1.8.3
Flag for en_USFlag for en_GB
14 Days Money-back guarantee

100% No-Risk, Money Back Guarantee!

Over the next 14 days, if any Power Plugins aren’t the best fit for your project, just reach out! We’ll refund 100% of your money.
No questions asked!

About UK Gift Aid for WooCommerce

Add a Gift Aid checkbox to your WooCommerce store’s checkout page. This is specifically for UK Gift Aid, which is a tax relief scheme for UK charitable organisations, but the plugin can be customised for any tax relief programme.

UK Gift Aid checkout consent
WooCommerce checkout Gift Aid declaration
  • Add a configurable customer Gift Aid Declaration box to your WooCommerce checkout.
  • Enable the Gift Aid box for all purchases, or make it only available when selected eligible products are in the basket.
  • Remember customers’ declarations for future/repeat donations.
  • Support for subscription renewal orders, with integrations for WooCommerce Subscriptions and RightPress Subscriptio.
  • Export Gift Aid declarations for your orders to a CSV file, for accounting purposes.
  • Retrospectively adjust consent for historic orders.
  • Built-in support for accepting donations at the checkout.
  • Accept donations from anywhere on your site with with an easy-to-use shortcode.
  • Fully customisable without writing any code.
  • Can also be customised by developers, if you want to do something more specific.
Accept donations at the checkout
Checkout Gift Aid & donations

Using Gift Aid for WooCommerce

Install and activate the plugin, then go to Settings > UK Gift Aid to go over the options. Tick the box to enable Gift Aid at the checkout.

The plugin can work in either of two modes

  1. Always show the Gift Aid option at the checkout, regardless of what’s in the basket.
  2. Only show the Gift Aid box at the checkout if certain qualifying products are in the basket.

Qualifying Gift Aid Products

If you enable the option to only enable Gift Aid for specific products, you’ll see a new option when you edit products in your store.

For variable products, this option is only available at the variable-product level… not for individual variations.

Per-product Gift Aid option
Qualify products for Gift Aid

At the checkout, the Gift Aid consent box will only be visible if one or more items in the basket qualify for gift aid.

Completed Orders

When orders have been captured (i.e. the customer has completed their purchase), the Gift Aid status is listed in the WooCommerce > Orders page at the back end of your website.

Capture UK Gift Aid consent
Capture UK Gift Aid consent

Accept Donations

To accept donations, you need a product to act as your “donation product”. The product’s price (in the cart) will be changed dynamically, depending on what the customer has pledged.

Donation checkout box
Accept donations anywhere on your site

Accept Donations at the Checkout

In Settings > UK Gift Aid, enable the setting to accept donations.

Click the “Auto-create a donations product” button to get started This will create a new product with a cost of zero, and hidden from your catalogue so it won’t affect the shop’s layout. It will also enable Gift Aid eligibility for the new product.

At the checkout, you can either accept preconfigured amounts, custom amounts, or both.

Configuring checkout donations
Settings for accepting donations

Accept Donations Anywhere on your Site

You can use the “donation_box” shortcode to include the “Make a Donation” box anywhere on your site. Id you don’t give it any parameters, your customers will be able to select from pre-defined amounts you’ve defined in the settings page.

Accept donations using a shortcode
Simple example of the shortcode
ParameterNotes / DefaultExample
title
string
Specify a custom title for the box.
Defaults to what’s in Settings > UK Gift Aid
title="Donate today"
buttons
boolean
Enable/disable the pre-defined amounts.
Defaults to what’s in Settings > UK Gift Aid
buttons="false"
custom
boolean
Enable/disable the custom amount box.
Defaults to what’s in Settings > UK Gift Aid
custom="false"
h
int
The heading-level to use for the title.
Default is 3 i.e. <h3>Your Title</h3>
To use <h4> as the title element
h="4"
Donation box shortcode parameters

Custom Styles for the Pill Buttons

If you want to override or adjust the style of the buttons yourself, you can use the following CSS selectors to do so. This should work when using the shortcode, and on the checkout page. You can this to your child theme’s style.css, or in the Additional CSS section of the Customiser:

/**
 * Pre-defined donation amount buttons.
 */
.checkout-donation-custom button.button,
a.checkout-donation-pill.button {
	background-color: transparent;
	border: 2px solid #2EA3F2;
	color: #2c80e8;
	padding: 0.7em;
}

.checkout-donation-custom button.button:hover,
a.checkout-donation-pill.button:hover {
	background-color: #f2f2f2;
	border-color: transparent;
	color: #0c71c3;
}

Custom Template

If you want to do something more advanced with the checkout donations box, you can create your own PHP template.

In the plugin’s folder, go into public-templates/checkout and copy the “accept-donation.php” file into woocommerce/checkout within your WordPress child theme.

Export CSV Data

To export your your customers’ Gift Aid Declaration/Consent as a CSV file:

When logged-in to your site as either an Administrator or Shop Manager, go to WooCommerce > Orders. Then click the “Gift Aid Data…” button in the toolbar

Export Gift Aid Consent as CSV Data
Export Gift Aid data…
Options when exporting Gift Aid Consent data
Export data options

Data Export Notes

  • The dates relate to when an order was created, not necessarily when it was paid.
  • Only orders that have a status of “Processing” or “Completed” are included in the export.
  • Each record in the export represents an order line item. So, if an order has three items that are eligible for gift aid, and the user has given their consent, that system will put three records into the export file – one for each item.

Integrations

Woo Donations

If you prefer to use the Woo Donations plugin to capture donations (rather than use the built-in checkout donations functionality), it’s easy to set up.

Configure Woo Donations

Install and enable the “Woo Donations” plugin and our “UK Gift Aid for WooCommerce” plugin.

> Donation, enable donations on the checkout page.

Capture donations at the checkout

This will place the donation box on the checkout, but the panel is inserted before the billing details. Don’t worry – we’ll can change that shortly.


Configure UK Gift Aid for WooCommerce

In Settings > UK Gift Aid, make sure the plugin is enabled on the checkout, and that it’s only enabled for specific products

Recommended settings for the Gift Aid plugin
Recommended settings for Gift Aid at the checkout

Then, enable the option to group the donations panel with the Gift Aid consent panel.

Woo Donations integration
Group the donation panel with the Gift Aid panel

Save those settings, then go to Products and find the Donation product that was automatically created by Woo Donations.

Donation product in WooCommerce
The Woo Donations product

Edit the product and enable its eligibility for Gift Aid.

Enable Gift Aid eligibillity at product-level
Enable Gift Aid at product-level

You might also want to make the site Hidden in the shop’s catalogue, because it will always be available at the checkout.

That’s it. To test… go to your site’s shop and add something to your basket. Go to the checkout and you should see the Donations box. Add a donation and the Gift Aid panel consent panel will appear when the checkout page reloads.

Customise the Donation Box Styles

The charitable donation box (and shortcode) can be used straight out-of-the-box. But on some sites (particularly those using Elementor), it can be helpful to add a bit of custom CSS to tidy things up a bit.

Choose a template that close to what you need, then copy-and-paste the its CSS snippet into your site’s “Additional CSS” area (or into your custom child theme’s “style.css”). These are the CSS variables that define the layout, and you can change the values to fit your theme.

WooCommerce charity donation box style one
/* Green and grey donation box */
:root {
	--wcukga-container-border: 2px;
	--wcukga-container-padding: 20px;
	--wcukga-container-background: #e8e8e8;
	--wcukga-container-trim: darkgreen;
	--wcukga-container-text: black;
	--wcukga-container-radius: 0;

	--wcukga-pill-buttons-height: 1em;
	--wcukga-custom-amount-height: 2em;

	--wcukga-button-radius: 0;
	--wcukga-button-off-bg: #142c23;
	--wcukga-button-off-text: #eeeeee;
	--wcukga-button-on-bg: #e4ff20;
	--wcukga-button-on-text: #333333;
}
WooCommerce charity donation box style two
/* Blue, green and white donation box */
:root{
	--wcukga-container-border: 2px;
	--wcukga-container-padding: 20px;
	--wcukga-container-background:  white;
	--wcukga-container-trim:  #888;
	--wcukga-container-text:  black;
	--wcukga-container-radius: 0;
	
	--wcukga-pill-buttons-height: 1.5em;
	--wcukga-custom-amount-height:  1em;

	--wcukga-button-radius:  0;
	--wcukga-button-off-bg:  #455ee0;
	--wcukga-button-off-text:  #ddd;
	--wcukga-button-on-bg:  #61CE70;
	--wcukga-button-on-text:  #fff;
}
WooCommerce charity donation box style three
/* Power-purples donation box */
:root{
	--wcukga-container-border: 1px;
	--wcukga-container-padding: 20px;
	--wcukga-container-background:  #f8f8f8;
	--wcukga-container-trim:  #bababa;
	--wcukga-container-text:  #420ea4;
	--wcukga-container-radius: 8px;
	
	--wcukga-pill-buttons-height: 1.2em;
	--wcukga-custom-amount-height:  1.2em;

	--wcukga-button-radius:  5px;
	--wcukga-button-off-bg:  #7309ba;
	--wcukga-button-off-text:  #ffe5ff;
	--wcukga-button-on-bg:  #940ceb;
	--wcukga-button-on-text:  #fff;
}

Once you’ve got your variables in there, paste the following snippet after your variables then save your changes.

/**
 * Apply donation-box styles from the CSS variables
 */
body .checkout-donation-pills * {
	line-height: var(--wcukga-pill-buttons-height);
}

body .checkout-donation-panel {
	border: var(--wcukga-container-border) solid var(--wcukga-container-trim);
	background-color: var(--wcukga-container-background);
	color: var(--wcukga-container-text);
	padding: var(--wcukga-container-padding);
	border-radius: var(--wcukga-container-radius);
}

body .checkout-donation-custom button.button,
body a.checkout-donation-pill.button {
	background-color: var(--wcukga-button-off-bg);
	color: var(--wcukga-button-off-text);
	text-decoration: none;
	border-radius: var(--wcukga-button-radius);
}

body .checkout-donation-custom button.button:hover,
body a.checkout-donation-pill.button:hover,
body a.checkout-donation-pill.button.current-donation-amount {
	background-color: var(--wcukga-button-on-bg);
	color: var(--wcukga-button-on-text);
}

body .checkout-donation-custom {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

body .checkout-donation-custom * {
	line-height: var(--wcukga-custom-amount-height);
}

Save your CSS and reload the site to check that the new styles come through correctly.

Customising the Plugin

To use these examples, paste the snippet(s) into your theme’s functions.php file.

Pre-Select the Consent Check Box for Existing Customers

Information If you use this snippet, be absolutely sure that you are respecting your customers’ actual consent.

/**
 * Pre-select the checkbox for all existing customers.
 */
function custom_does_this_user_prefer_gift_aid($is_preferred) {
	if (!empty($user = wp_get_current_user())) {
		$is_preferred |= in_array('customer', (array) $user->roles);
	}

	return $is_preferred;
}
add_filter('does_this_user_prefer_gift_aid', 'custom_does_this_user_prefer_gift_aid', 10, 1);

Pre-Select the Consent Check Box for Everyone

Information If you use this snippet, be absolutely sure that you are respecting your customers’ actual consent.

/**
 * Pre-select the checkbox for all customers.
 */
add_filter('does_this_user_prefer_gift_aid', '__return_true');

Personalise the Consent Message

If the user is logged-in, inject their name into the consent message to make it more personal.

/**
 * Personalise the Gift Aid consent message.
 */
function custom_gift_aid_consent($message) {
	if (!empty($user = wp_get_current_user())) {
		$message = sprintf(
			'I, <strong>%s</strong>, am a UK tax payer, and I wish Example Charity to reclaim tax on this donation.',
			$user->display_name
		);
	}

	return $message;
}
add_filter('gift_aid_consent', 'custom_gift_aid_consent', 10, 1);

Add a Custom Column to the CSV Export

To add a new column to the Gift Aid consent CSV export spreadsheet, you need to hook two filters. One to add the new column, and the other to render the value for each row (order).

/**
 * Add custom column(s) to the Gift Aid Consent CSV export.
 *
 * @param  array    $field_names The default list of field names.
 *
 * @return array    The modified array of field names.
 */
function custom_export_gift_aid_consent_field_names($field_names) {
	$field_names['order-note'] = 'Customer Order Note';

	return $field_names;
}
add_filter('export_gift_aid_consent_field_names', 'custom_export_gift_aid_consent_field_names', 10, 1);

/**
 * Adjust row values for the Gift Aid Consent CSV export.
 *
 * @param  array    $row_values    Standard field values for the row/order.
 * @param  WC_Order $order The     The WooCommerce order object for this row.
 * @param  int      $product_id    The Product ID for the order line item.
 * @param  int      $variation_id  The Variation ID for the order line item, if it is a product variation
 *                                 Zero if the line item is not a product variation.
 *
 * @return array    The modified array of values.
 */
function custom_export_gift_aid_consent_row_values($row_values, $order, $product_id, $variation_id) {
	$row_values['order-note'] = wp_strip_all_tags($order->get_customer_note());

	return $row_values;
}
add_filter('export_gift_aid_consent_row_values', 'custom_export_gift_aid_consent_row_values', 10, 4);

Action & Filter Hooks

HookParametersNotes
does_this_user_prefer_gift_aid
filter : bool
$is_preferredDoes the current user prefer to have the Gift Aid checkbox pre-selected at the checkout (e.g. from a previous purchase).
is_uk_gift_aid_applicable_to_cart
filter : bool
$is_applicableThis is true if one or more products in the cart qualify for Gift Aid, or if the plugin is configured to always show the option at the checkout. This filter lets you apply custom logic to determine whether or not to show the option at the checkout.
gift_aid_short_message
filter : string
$messageOverride the standard short message in the checkout box.
gift_aid_more_info
filter : string
$messageOverride the standard “more info” message in the checkout box.
gift_aid_consent
filter : string
$messageOverride the actual consent message that’s adjacent to the check box.
checkout_donation_pill_count
filter : int
$pill_countThe number of checkout donation options/pills. Default value is three.
export_gift_aid_consent_field_names
filter : array
$field_namesModify the columns that are output in the gift aid consent CSV export. This is an associative array of "field-slug" => "Column Title" where field-slug can by anything you want when adding new columns. If you override this to return an empty array, the export will be aborted.
export_gift_aid_consent_row_values
filter : array
$row_values
$order
$product_id
$variation_id
Modify the row values for an order that is eligible for export. $order is a WC_Order object.
$product_id and $variation_id are integers ($variation_id is zero if it is the line item is not a product variation)
Customise the Gift Aid checkout consent box

Changelog: UK Gift Aid for WooCommerce

Version 1.8.3

Released: 2023-05-15

Adjusted how the export consents report works. Instead of relying on a wp-admin/...php file for the URL, we now serve it through a URL rewrite.

This should fix issues when hosting providers block direct access to PHP files within a plugin's directory.

Version 1.8.2

Released: 2023-05-13

  • Added a new option to enable/disable the additional short message at the checkout only (i.e. hide it on the product page and in the shortcode)
  • More work on the Ajax mode so the "Cancel donation" link hides/shows properly
  • Added support for entering a value of 0 (zero) into the custom donation amount to cancel the current donation pledge

Version 1.8.1

Released: 2023-05-13

  • Better detection at the checkout of when the Gift Aid consent box is required

Older releases

  • Added a new option to inject a short optional message just before the donation amounts in the donation box.
  • Follow-up fix to the recent adjustment to the optional "more info".
  • Added a new option to the WC UK Gift Aid Settings so you can enable/disable the "more info" button in the Gift Aid Consent box at the checkout.
  • Changed the donation box on the checkout page to use Ajax calls when changing the donation amount. This is to avoid the customer's billing details being reset on a page load/refresh.
  • Extended the consent export CSV to include Product ID and Variation ID (for variable products)
  • Extended the "export_gift_aid_consent_row_values" filter for customising the export CSV to include the Product ID and (optional) Variation ID
  • Added new filters so you can extend/customise the CSV data output when extracting user consents. You can use this to apply custom logic or prevent certain rows from being exported.
  • Added two new locations in the user My Account area where you can insert the Gift Aid Consent box, on the "edit-account" endpoint.
  • Customers can now update their Gift Aid consent in the WooCommerce My Account area.
  • New integration for the official WooCommerce Subscriptions.
  • New integration for the RightPress "Subscriptio" plugin.
  • Subscription renewal orders will pick up the customer's saved consent preferences.

Changed the behaviour of the "Accept donations at the checkout" option, so you can now enable a Donation product (and shortcode) by leave the accept-donation box off the checkout (if you want to).

Fixed a template issue that happens on some sties where there might be a warning about "wc_get_template was called incorrectly".

Minor update to the power-plugins core library.

Added an option on the settings page so you can configure how many predefined donation amounts you want to show at the checkout and on the Donation Product page. This used to be fixed at three options, but now you can have from one up to twenty preconfigured amounts.

  • The donation product now works great as a regular visible product. Set it to be a visible simple or variable product and show it in your shop's main catalogue.
  • Added a "More options" link on the Make a Donation box (checkout and shortcode) if the donation product is variable.

Minor update that lets you view and edit a customer's gift aid consent at user-level (view/edit was already available at order-level). The user-level field is essentially the customer's consent-choice from their most recent (Gift Aid eligible) checkout experience.

note The "Remember customers' choice for future purchases" setting needs to be enabled for this feature to be accessible.

  • New Use the "donation_box" shortcode to accept donations from anywhere on your site.
  • New Added a meta box when editing a WooCommerce order so you can retrospectively update Gift Aid consent. Useful for historic orders, when you've captured user-consent by another means.

Fixed a CSS issue on Safari mobile devices that was causing the Gift Aid Consent tick-box to become too small to click in some cases. Removed CSS display:flex; and reverted to a conventional layout with a small margin around the checkbox.

Added a notification to the checkout when Gift Aid is disabled. Only visible to administrators. Helpful when setting up a new installation.

Minor update to the core libraries, and added support for gettext translations.

New built-in feature to accept donations directly in the checkout. Choose from preconfigured donation amounts, or let your customers set their own amount.

If the Woo Donations plugin is detected, there's a new option that lets you move the checkout page Donations box so it's adjacent to the Gift Aid Declaration box.

New feature : Export your Gift Aid declaration/consent for your orders. Export all, or export by date range. Accessible from the WooCommerces | Orders admin page.

Minor update to support the new power-plugins update library and core assets.

Minor bug fix when recalling customers' previously selected gift aid choice.

Fixed an issue where some products weren't correctly saving the per-product "enable Gift Aid option" properly.

Fixed broken link to the power-plugins update server for automatic updates.

Initial public release.

Initial pre-release.

7 reviews for UK Gift Aid & Donations for WooCommerce

  1. james bryan
    5 out of 5

    james bryan

    A wonderful plugin that plays nicely with all the other plugins I had to install to achieve what I needed for my site. The donation feature at checkout is a real bonus that I wasn’t expecting and it works seemlessly and intuitively. Thank you 🙂

  2. DAVID LONGSTAFFE
    5 out of 5

    DAVID LONGSTAFFE

    I needed to add Gift Aid to check out on donations, the site already has Woo Commerce shop activated so I first considered woo donations however, the feedback was not good. I came across UK-gift-aid-for-WooCommerce and set about contacting them about 5pm Sunday to check a few details out. By 6.30pm I had all the info I needed to make the purchase ‘amazing support response.’
    Direction and installation was smooth with post install questions answered within 20 minutes ‘remember this is Sunday Evening.’ It allowed me to have Gift Aid at checkout on ‘Donation Page’ created through DIVI theme builder duplicated from my Woo product page also managed through the theme builder. I just assigned the duplicated theme to another page and edited as a ‘Donation’.
    The Gift Aid function allows a tick box verification for Donations, Products sales or both together. It allows three fixed amounts you can set in the settings and a variable box that allows you to add a variable amount with a product but also allows a prefixed amount to be varied. I could not ask for a better plugin to do this job, added to an exiting Woo shop its amazing.
    It allows Gift Aid documentation reports to be downloaded from the Woo Shop settings.
    ‘Best Service’ on any WP app or plugin and the plugin is stable with no side issues.
    Much appreciated
    Already looking at other plugins

  3. Nigel
    5 out of 5

    Nigel

    Amazingly fast response to a new feature request I made. There was an update waiting for me the next day. Superb plugin. Thanks

  4. Hazel
    5 out of 5

    Hazel

    A very useful plugin that joins with other plugins we have on our site. Thank you.

  5. Rajeev
    5 out of 5

    Rajeev

    Great plugin, but it’s the support that is the star of this show! Any issues we had were fixed almost straight away. Highly recommended.

  6. Alasdair
    5 out of 5

    Alasdair

    The GiftAid plugin is just fantastic and works perfectly for my client’s website. I needed an adjustment to it and Paul worked on it almost immediately. Fantastic product and service.

  7. Mike Brenard
    5 out of 5

    Mike Brenard

    Really great plugin. Simple to set up and works perfectly with an easy-to-use tick box for donors. I had an issue with the downloadable csv of gift aided orders not working on my server. Support replied to my initial request for help within about ten minutes and the issue was fixed with an update for the plugin with a few hours. Highly recommended

Add a review

UK Gift Aid for WooCommerce
UK Gift Aid & Donations for WooCommerce
From £30