Last active
September 3, 2021 01:33
-
-
Save ericnicolaas/13fdd5f6444433ee127b5b75a3118a9d to your computer and use it in GitHub Desktop.
Add columns to Gift Aid export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( | |
'charitable_giftaid_export_row', | |
function( $row ) { | |
return array( | |
'donation_id' => $row['donation_id'] ?? '', | |
'title' => $row['title'] ?? '', | |
'first_name' => $row['first_name'] ?? '', | |
'last_name' => $row['last_name'] ?? '', | |
'house_number' => $row['house_number'] ?? '', | |
'postcode' => $row['postcode'] ?? '', | |
'agg_donations' => '', | |
'sponsored_event' => '', | |
'date' => $row['date'] ?? '', | |
'amount' => $row['amount'] ?? '', | |
'status' => $row['status'] ?? '', | |
); | |
} | |
); | |
add_filter( | |
'charitable_giftaid_export_entries_columns', | |
function() { | |
return array( | |
'donation_id' => __( 'Donation ID', 'charitable-gift-aid' ), | |
'title' => __( 'Title', 'charitable-gift-aid' ), | |
'first_name' => __( 'First name', 'charitable-gift-aid' ), | |
'last_name' => __( 'Last name', 'charitable-gift-aid' ), | |
'house_number' => __( 'House name or number', 'charitable-gift-aid' ), | |
'postcode' => __( 'Postcode', 'charitable-gift-aid' ), | |
'agg_donations' => 'Aggregated donations', | |
'sponsored_event' => 'Sponsored event', | |
'date' => __( 'Donation date', 'charitable-gift-aid' ), | |
'amount' => __( 'Amount', 'charitable-gift-aid' ), | |
'status' => __( 'Status', 'charitable-gift-aid' ), | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment