UK Gift Aid for WooCommerce

Add a UK Gift Aid checkbox to the WooCommerce checkout.

Licences for this plugin need to be renewed annually.

SKU: N/A Category: Current: 1.0.3
money-back guarantee sticker


100% No-Risk, Money Back Guarantee!

We're excited to have you experience the power of our plugins. So over the next 14 days, if any Power Plugins aren’t the best fit for your project, simply reach out! We’ll happily 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.

  • Add a configurable customer consent box to your WooCommerce checkout.
  • Enable the box for all purchases, or make it only available when selected eligible products are in the basket.
  • Remember custom consent for future/repeat donations.
  • Fully customisable without writing any code.
  • Can also be customised by developers, if you want to do something more specific.
UK Gift Aid checkout consent
UK Gift Aid checkout consent

Using Gift Aid for WooCommerce

Install and active 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 in the back-end of your website.

Capture UK Gift Aid consent
Capture UK Gift Aid consent

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);

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.
Customise the Gift Aid checkout consent box

Changelog: UK Gift Aid for WooCommerce

Version 1.0.3

Released: 2022-05-24

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

Version 1.0.2

Released: 2022-04-28

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

Version 1.0.1

Released: 2022-04-25

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

Older releases

Initial public release.

Initial pre-release.

Reviews

There are no reviews yet.

Be the first to review “UK Gift Aid for WooCommerce”