View functions.php
<?php | |
/** | |
* Adjust the before/after variables to limit the deletion to | |
* a specific date range. If you want to delete all, set a very | |
* early $before date (i.e. '2000-01-01'). | |
*/ | |
add_action( 'admin_init', function() { | |
$after = '2020-11-01'; | |
$before = '2020-11-30'; | |
$query = new Charitable_Donations_Query( |
View functions.php
<?php | |
add_filter( | |
'charitable_newsletter_connect_provider_donation_fields', | |
function( $fields ) { | |
$fields['donation_gateway'] = 'Payment Gateway'; | |
return $fields; | |
} | |
); |
View style.css
.custom-donation-amount-wrapper::before { | |
content: "$"; | |
display: block; | |
position: absolute; | |
bottom: .5em; | |
left: 1em; | |
color: #bbb; | |
padding: 6px 0 6px 7px; | |
font-size: 1em; | |
} |
View functions.php
<?php | |
function ed_charitable_set_paypal_item_name( $args, $donation_id, $processor ) { | |
$donation = charitable_get_donation( $donation_id ); | |
$campaign_id = current( $donation->get_campaign_donations() )->campaign_id; | |
$parent_id = wp_get_post_parent_id( $campaign_id ); | |
$parent_title = get_the_title( $parent_id ); | |
$paypaldescript = 'LETRGive - ' . $parent_title . ' - #106' . $donation_id; | |
$args['item_name'] = $paypaldescript; | |
return $args; | |
} |
View functions.php
<?php | |
/** | |
* This function adds a custom text field to the campaign submission | |
* form, as well as the admin campaign editor, campaign emails, and | |
* campaign export. | |
* | |
* Note: This example requires Ambassadors 2+. For an example that worked | |
* on previous version, see the link below. | |
* | |
* @see https://github.com/Charitable/library/blob/master/extensions/ambassadors/legacy/add-text-field.php |
View functions.php
<?php | |
/** | |
* This function adds a custom text field to the campaign submission | |
* form, as well as the admin campaign editor, campaign emails, and | |
* campaign export. | |
* | |
* Note: This example requires Ambassadors 2+. For an example that worked | |
* on previous version, see the link below. | |
* | |
* @see https://github.com/Charitable/library/blob/master/extensions/ambassadors/legacy/add-text-field.php |
View functions.php
<?php | |
/** | |
* If the original recurring donation opted in to Gift Aid, apply Gift Aid for | |
* all renewals too. | |
* | |
* @param array $args Array of arguments to create donation. | |
* @return array | |
*/ | |
function ed_charitable_apply_gift_aid_to_renewals( $args ) { | |
// Make sure this is a renewal. |
View functions.php
<?php | |
$fields_api->register_field( | |
new Charitable_Campaign_Field( | |
'attendees', | |
[ | |
'label' => 'Attendees', | |
'data_type' => 'meta', | |
'admin_form' => [ | |
'required' => false, | |
'section' => 'hike-details', |
View functions.php
<?php | |
add_filter( | |
'charitable_campaign_submission_fields', | |
function( $fields, $form ) { | |
$waiver_fields = array( | |
'legend' => 'Liability Waiver and Release', | |
'type' => 'fieldset', | |
'fields' => array( | |
'waiver' => array( | |
'type' => 'paragraph', |
NewerOlder