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 {company_or_name} tag to GiveWP PDF Receipts using the give_pdf_compiled_template_content filter. | |
* Outputs the Company name if provided, otherwise outputs donor's full name. | |
*/ | |
add_filter( 'give_pdf_compiled_template_content', function( $template_content, $args ) { | |
//var_dump("<pre>".print_r($args,true)."</pre>"); | |
// | |
// Make sure payment ID is available. | |
$payment_id = ! empty( $args['donation_id'] ) ? absint( $args['donation_id'] ) : 0; |
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_enqueue_scripts", function () { | |
?> | |
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
const validValues = ["one-time", "daily", "week", "month", "quarter", "year"]; | |
const params = new URLSearchParams(window.parent.location.search); | |
const paymentType = params.get("payment_type"); | |
if (!paymentType || !validValues.includes(paymentType)) return; |
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_filter( 'give_export_donors_get_default_columns', static function($columnData) { | |
$columnData['donor_company'] = esc_html__( 'Company', 'give' ); | |
return $columnData; | |
}); | |
use Give\Donors\Models\Donor; | |
add_filter( 'give_export_get_data_donors', static function($exportData) { | |
foreach($exportData as $key => $data){ |
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 | |
use GiveFunds\Models\Fund; | |
use GiveFunds\Repositories\Funds; | |
use GiveFunds\Repositories\Revenue; | |
function give_stripe_custom_payment_meta( $args ) { | |
// Sanitize the input posted data to the form. | |
$posted_data = give_clean( filter_input_array( INPUT_POST ) ); |
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
/** | |
* EXAMPLE: https://example.com/donations/give-form/?tribute=yes&first=Peter&last=Joseph | |
**/ | |
add_action( 'givewp_donation_form_enqueue_scripts', function(){ | |
?> | |
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
// Helper function to get URL parameters | |
function getUrlParam(param) { |
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
CREATE TABLE wp_give_campaigns ( | |
id INT UNSIGNED NOT NULL AUTO_INCREMENT, | |
campaign_page_id INT UNSIGNED NULL, | |
form_id INT NOT NULL, | |
campaign_type VARCHAR(12) NOT NULL DEFAULT '', | |
campaign_title TEXT NOT NULL, | |
campaign_url TEXT NOT NULL, | |
short_desc TEXT NOT NULL, | |
long_desc TEXT NOT NULL, | |
campaign_logo TEXT NOT NULL, |
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] => |
NewerOlder