Skip to content

Instantly share code, notes, and snippets.

#: assets/dist/js/donor-dashboards-app.js:1
msgid "View Receipt"
msgstr ""
#: assets/dist/js/donor-dashboards-app.js:1
msgid "Count"
msgstr ""
#: assets/dist/js/donor-dashboards-app.js:1
msgid "Statement"
msgstr ""
#: assets/dist/js/donor-dashboards-app.js:1
@rickalday
rickalday / export-ffm-phone.php
Created June 21, 2024 00:10
Export FFM Phone
<?php
function export_option_givewp_ffm_phone() {
?>
<tr class="give-export-option-fields give-export-option-custom-field">
<td scope="row" class="row-title">
<label><?php esc_html_e( 'Phone Number:', 'give' ); ?></label>
</td>
<td class="give-field-wrap">
<div class="give-clearfix">
@rickalday
rickalday / give_upgrades_donor_name.php
Last active June 19, 2024 14:39
Fixes GiveWP issue with missing firstName
<?php
function give_upgrades_donor_name() {
// Adjust the number in the next line if you have more than 9999 donors
$donors = Give()->donors->get_donors(['number' => 9999,]);
if ( $donors ) {
// Loop through Donors
foreach ( $donors as $donor ) {
@rickalday
rickalday / give_export_transaction_id.php
Created March 1, 2024 17:14
Add a checkbox to export the donation Transaction ID in GiveWP donation history export
<?php
function give_export_transaction_id() {
?>
<tr class="give-export-option-fields give-export-option-custom-field">
<td scope="row" class="row-title">
<label><?php esc_html_e( 'Transaction ID:', 'give' ); ?></label>
</td>
<td class="give-field-wrap">
<div class="give-clearfix">
@rickalday
rickalday / export_option_givewp_mc_fields.php
Last active October 17, 2023 16:19
Export Mailchimp status in GiveWP
<?php
function export_option_givewp_mc_fields() {
?>
<tr class="give-export-option-fields give-export-option-custom-field">
<td scope="row" class="row-title">
<label><?php esc_html_e( 'MailChimp:', 'give' ); ?></label>
</td>
<td class="give-field-wrap">
<div class="give-clearfix">
@rickalday
rickalday / export_custom_field_no_value.php
Created July 6, 2023 19:07
Export custom fields without a value
function export_option_givewp_field_api_fields() {
?>
<tr class="give-export-option-fields give-export-option-custom-field">
<td scope="row" class="row-title">
<label><?php esc_html_e( 'Custom Field Title:', 'give' ); ?></label>
</td>
<td class="give-field-wrap">
<div class="give-clearfix">
<ul class="give-export-option-custom-fields-ul">
<!-- Custom field checkbox -->
@rickalday
rickalday / stripe-pass-custom-meta-for-payments.php
Created June 29, 2023 23:35
Pass custom field data to Stripe when payment is processed.
<?php
function give_stripe_custom_payment_meta( $charge_args ) {
// Sanitize the input posted data to the form.
$posted_data = give_clean( filter_input_array( INPUT_POST ) );
//Uncomment the followign line to print the $posted_data array to the error log
//error_log(print_r($posted_data, TRUE));
//Get form ID
@rickalday
rickalday / give_include_fund_payment_meta.php
Created June 23, 2023 20:42
Include fund in Stripe payment metadata
<?php
use GiveFunds\Models\Fund;
use GiveFunds\Repositories\Funds;
use GiveFunds\Repositories\Revenue;
function give_include_fund_payment_meta( $charge_args ) {
if ( ! defined( 'GIVE_FUNDS_ADDON_VERSION' )) {
return;
@rickalday
rickalday / custom_salesforce_data.php
Last active July 18, 2024 23:27
Send a bunch of donation metadata to Salesforce
<?php
function addGiveSalesforceDonationArgs(
$args,
\GiveSalesforce\Salesforce\DataTransferObjects\SalesforceOpportunityData $data
) {
// Acknowledgement Status
$args['npsp__Acknowledgment_Status__c'] = "Acknowledged";
@rickalday
rickalday / add_donor_created_date.php
Last active June 7, 2023 18:24
Add Donor Creation Date to Donor Export File
<?php
function give_add_custom_column_to_export_donor( $default_columns ) {
$default_columns['date_created'] = esc_html__( 'Donor Created Date', 'give' );
return $default_columns;
}
add_filter( 'give_export_csv_cols_donors', 'give_add_custom_column_to_export_donor' );
add_filter( 'give_export_donors_get_default_columns', 'give_add_custom_column_to_export_donor' );