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( 'give_fields_after_donation_amount', function( $collection, $formID ) { | |
// Only display for forms with the IDs "35" and "578"; | |
$forms = array( 35, 578 ); | |
if ( in_array( $formID, $forms ) ) { | |
$collection->append( | |
// Select field with options. | |
give_field( 'select', 'myConference' ) | |
->options( | |
[ 'east', __( 'Eastern Conference' ) ], |
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 | |
/** | |
* MU plugin. | |
* | |
* Plugin Name: Polylang GiveWP Cross Domain Assets URL | |
* Description: Fixes cross origin domain issues with GiveWP and Polylang | |
* Version: 1.0 | |
* Author: Rick Alday | |
* Author URI: http://www.rickalday.com/ | |
*/ |
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 export_option_givewp_field_api_fields() { | |
?> | |
<tr class="give-export-option-fields give-export-option-custom-field"> | |
<td scope="row" class="row-title"> | |
<label><?php esc_html_e( 'Custom Field Title:', 'give' ); ?></label> | |
</td> | |
<td class="give-field-wrap"> | |
<div class="give-clearfix"> |
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 | |
/** | |
* @param array $args - associate array of data to be sent to Salesforce. example: ["Field_Name" => "Value"] | |
* @param SalesforceOpportunityData $data - the original data object where you can access things like donationId. example: $data->donationId | |
* @return array | |
*/ | |
function addGiveSalesforceDonationArgs( | |
$args, | |
\GiveSalesforce\Salesforce\DataTransferObjects\SalesforceOpportunityData $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 | |
function give_add_complete_date_pdf_tag( $template_content, $args ) { | |
//$completedate = $args['payment_meta']['_give_completed_date']; | |
$completedate = date_i18n( get_option( 'date_format' ), strtotime( $args['payment_meta']['_give_completed_date'] ) ); | |
$template_content = str_replace( '{completedate}', $completedate, $template_content ); | |
return $template_content; | |
} |
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_clean_post_cache( $donation_id ) { | |
clean_post_cache( $donation_id ); | |
} | |
add_action( 'give_update_payment_status', 'givewp_clean_post_cache' ); |
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 tranlate_recurring_level_text() { ?> | |
<script> | |
var Give_Recurring_Vars = window.Give_Recurring_Vars; | |
jQuery( document ).ready( function( $ ) { | |
var doc = $( document ); |
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 | |
// Adds some default Multi-Step form template values | |
// Craate the _give_sequoia_form_template_settings and _give_donation_levels meta keys in Ninja Forms | |
// with a value of array | |
add_filter( 'ninja_forms_create_post_meta_value', function( $meta_value, $post_type, $meta_key ){ | |
if( 'give_forms' == $post_type && '_give_sequoia_form_template_settings' == $meta_key ){ | |
$meta_value = array ( | |
'visual_appearance' => |
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 adds a custom field using GiveWP Fields API | |
*/ | |
add_action( 'give_fields_after_donation_amount', function( $group ) { | |
$group->append( | |
give_field( 'text', 'guestName' ) | |
->showInReceipt() | |
->minLength(2) |
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
function give_populate_amount_name_email() { | |
?> | |
<script> | |
jQuery( document ).ready(function() { | |
( function( window, document, jQuery, undefined ) { | |
'use strict'; | |
var giveCustom = {}; | |
giveCustom.init = function() { |