For developers, the Gift Aid Add On offers one filter hook. Use it to show or hide the Gift Aid checkbox at checkout for specific membership levels.

Filters

pmproga_show_gift_aid_at_checkout

Determines whether the Gift Aid checkbox shows on the checkout page. By default it shows for paid levels and for levels with the Donations Add On’s Enable Donations setting checked, and it’s hidden for free levels. Return true to show the checkbox or false to hide it.

When the checkbox is hidden, the Add On doesn’t record anything for that checkout: the order gets no Gift Aid note and the member’s saved choice isn’t changed.

apply_filters( 'pmproga_show_gift_aid_at_checkout', bool $show_gift_aid, object $pmpro_level );

Parameters

  • $show_gift_aid: bool; Whether to show the Gift Aid checkbox. Default true for paid levels and levels with donations enabled, false for free levels.
  • $pmpro_level: object; The membership level at checkout, from pmpro_getLevelAtCheckout().

Example: Hide the checkbox for specific levels

function my_pmproga_hide_gift_aid_for_levels( $show_gift_aid, $pmpro_level ) {
	// Level IDs that should not offer Gift Aid.
	$levels_without_gift_aid = array( 2, 5 );

	if ( ! empty( $pmpro_level->id ) && in_array( (int) $pmpro_level->id, $levels_without_gift_aid, true ) ) {
		return false;
	}

	return $show_gift_aid;
}
add_filter( 'pmproga_show_gift_aid_at_checkout', 'my_pmproga_hide_gift_aid_for_levels', 10, 2 );

Example: Show the checkbox on every level, including free levels

add_filter( 'pmproga_show_gift_aid_at_checkout', '__return_true' );

Last updated on November 19, 2026


Was this article helpful?
YesNo