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
Error from migrate_forms_to_campaign_forms: | |
Migration Failed | |
Migration ID: migrate_forms_to_campaign_forms | |
Last run: 2025-04-04 15:10:48 | |
Error details: | |
Give\Framework\Migrations\Exceptions\DatabaseMigrationException Object | |
( | |
[message:protected] => An error occurred while creating initial campaigns | |
[string:Exception:private] => |
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
<?php | |
/** | |
* This template is used to display the donation grid with [donation_grid] | |
*/ | |
use Give\Helpers\Form\Template; | |
use Give\Helpers\Form\Utils as FormUtils; | |
// Exit if accessed directly. | |
if (!defined('ABSPATH')) { |
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
<?php | |
function givewp_export_full_address( $data, $payment, $columns, $instance ) { | |
$address = $payment->address; | |
$data['address_line1'] = isset( $address['line1'] ) ? $address['line1'] : ''; | |
$data['address_line2'] = isset( $address['line2'] ) ? $address['line2'] : ''; | |
$data['address_city'] = isset( $address['city'] ) ? $address['city'] : ''; | |
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
<?php | |
function give_export_base_amount() { | |
?> | |
<li> | |
<label for="give-export-payment-base_amount"> | |
<input type="checkbox" checked name="give_give_donations_export_option[base_amount]" id="give-export-base_amount"><?php _e( 'Base Amount', 'give' ); ?> | |
</label> | |
</li> | |
<?php |
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
<?php | |
add_action('givewp_donation_form_schema', function($form) { | |
//Get field by name attribute | |
$field = $form->getNodeByName('field_name_here'); | |
// if the field is not found, return | |
if (!$field) { | |
return; | |
} | |
// get the current default value |
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
--This applies to the give_formmeta table specifically but it can be used for any other table by editing the table name | |
DELETE FROM wp_give_formmeta WHERE meta_id NOT IN ( | |
SELECT * | |
FROM ( | |
SELECT MAX(meta_id) | |
FROM wp_give_formmeta | |
GROUP BY form_id, meta_key | |
) AS x | |
) ORDER BY meta_key |
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
<?php | |
function givewp_pdf_nifnie_tag( $template_content, $args ) { | |
$meta_keys = ['nifnie', 'dninie', 'dniniecif']; | |
$buyer_info = give_get_payment_meta_user_info( $args['donation_id'] ); | |
$post = get_post($args['donation_id']); | |
if ($post->post_parent) { | |
$post_id = $post->post_parent; | |
} else { | |
$post_id = $args['donation_id']; |
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
<?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 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('give_countries', 'my_custom_give_countries'); | |
function my_custom_give_countries() { | |
$countries = array( | |
'CA' => esc_html__( 'Canada', 'give' ), | |
); | |
return $countries; | |
} | |
<?php |
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
<?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); |
NewerOlder