This file contains 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
<?php | |
function give_export_gift_aid() { | |
?> | |
<li> | |
<label for="give-export-payment-gift_aid"> | |
<input type="checkbox" checked name="give_give_donations_export_option[gift_aid]" id="give-export-gift_aid"><?php _e( 'Gift Aid', 'give' ); ?> | |
</label> | |
</li> | |
<?php |
This file contains 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('give_countries', 'my_custom_give_countries'); | |
function my_custom_give_countries() { | |
$countries = array( | |
'CA' => esc_html__( 'Canada', 'give' ), | |
); | |
return $countries; | |
} | |
<?php |
This file contains 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
<?php | |
add_action('givewp_donation_form_schema', function($form) { | |
$comment = $form->getNodeByName('comment'); | |
// if the comment field is not found, return | |
if (!$comment) { | |
return; | |
} | |
// require field | |
$comment->required(true); |
This file contains 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
<?php | |
add_filter('give_get_country_locale', 'give_custom_requirements'); | |
function give_custom_requirements() { | |
$countries = array( | |
'US' => [ | |
'state' => [ | |
'required' => false, | |
], | |
'address1' => [ |
This file contains 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
<?php | |
function give_export_profile_id() { | |
?> | |
<li> | |
<label for="give-export-payment-subscription_profile_id"> | |
<input type="checkbox" checked name="give_give_donations_export_option[subscription_profile_id]" id="give-export-subscription_profile_id"><?php _e( 'Subscripton Profile ID', 'give' ); ?> | |
</label> | |
</li> | |
This file contains 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
<php | |
function givewp_pdf_full_address_tag( $template_content, $args ) { | |
$buyer_info = give_get_payment_meta_user_info( $args['donation_id'] ); | |
$address = isset( $buyer_info['address'] ) ? $buyer_info['address'] : ''; | |
$address_data = []; |
This file contains 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
<?php | |
/** | |
* This function sets the column header in the generated CSV file for the custom field. Add an if statement for each aditional field. | |
*/ | |
function givewp_custom_columns_name( $cols ) { | |
if ( isset( $cols['givewp_employer'] ) ) { | |
$cols['givewp_employer'] = __( 'Employer', 'give' ); | |
} |
This file contains 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
<?php | |
function givewp_subscription_columns_name( $cols ) { | |
if ( isset( $cols['givewp_subscription_id'] ) ) { | |
$cols['givewp_subscription_id'] = __( 'Subscription ID', 'give' ); | |
} | |
return $cols; | |
} |
This file contains 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
<table id="fresh_blue" class="fresh_blue" style="margin: 0;padding: 0;color: #333;height: 100%;background-color: #f8f8f8;max-height: 100%;min-height: 100%" border="0" width="100%"> | |
<tbody> | |
<tr> | |
<td width="100%"> | |
<table style="margin: 0;padding: 0" border="0" width="100%"> | |
<tbody> | |
<tr> | |
<td style="font-family: Helvetica;background-color: #5b50f1;font-size: 14px;color: #fff;font-style: italic;line-height: 40px;text-align:center" align="center" valign="middle" width="100%"></td> | |
</tr> | |
</tbody> |
This file contains 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
<?php | |
add_action('givewp_donation_form_schema', static function (Give\Framework\FieldsAPI\DonationForm $form) { | |
$field = Give\Framework\FieldsAPI\HTML::make('YourFieldName') | |
->html('<button | |
type="button" | |
data-theme-toggle | |
aria-label="Change to light theme" | |
>Change to light theme</button> | |
'); |
NewerOlder