Add Picture Field To Donation Form
/** * In this example, a picture field is added to the donation form, * allowing donors to upload an image as part of the donation process. * * The picture ID is added in the donation meta, with a…Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/** * In this example, a picture field is added to the donation form, * allowing donors to upload an image as part of the donation process. * * The picture ID is added in the donation meta, with a…Continue reading
/** * This snippet shows you how you can easily add the campaign name * as a heading before the donation form. * * @param Charitable_Form $form * @return void */ function ed_show_campaign_title_before_donation_before( $form ) { if ( ! is_a(…Continue reading
/** * Change the “Postcode” field into a “ZIP Code” field. * * @param array[] $fields * @return array[] */ add_action( ‘init’, function ( $fields ) { $fields = charitable()->donation_fields(); $field = $fields->get_field( ‘postcode’ ); $field->label = ‘ZIP Code’; $field->set(…Continue reading
/** * This example shows how to remove fields from the donation form. * * Note that this approach requires Charitable 1.6 or above. */ add_action( ‘init’, function() { $fields_api = charitable()->donation_fields(); /** * In this example, we remove the…Continue reading
/** * This example shows how you can add a new campaign field to be displayed * in Charitable emails related to campaigns. */ /** * Register the extra field. * * @param array $fields * @param Charitable_Email $email *…Continue reading
/** * This example shows how to change the output of the line items * displayed by the donation summary in email receipts. In this example, * we simply display the total amount donated on each line. * * @param…Continue reading
/** * If you want to add an email tag for an existing donation field, * you can use the code sample below. * * To add a completely custom email tag field, you can either register * a field…Continue reading
/** * This example shows how you can add a new field to your donation-related * emails which shows the offline payment instructions for offline donations. */ /** * Register the extra field. * * @param array $fields * @param…Continue reading
/** * Right after a donation is made, this sends a notification to admin if * the donation is pending AND it was made in offline mode. * * @param int $donation_id * @return boolean */ function en_send_donation_notification_for_pending_offline( $donation_id )…Continue reading
/** * This snippet shows how to enable an email tag for the gateway_label * donation field. * * This same pattern can be used to enable email tags for other * donation fields. Find a list of the default…Continue reading