Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example code for cf_zapier_data filter. See: https://calderaforms.com/doc/cf_zapier_data/
<?php
/**
* Send PayPal Transaction ID to Zapier when using Caldera Forms PayPal Express and Caldera Forms Zapier
*/
add_filter( 'cf_zapier_data', function( $data) {
global $transdata;
if( isset( $transdata['paypal_express'], $transdata['paypal_express']['result'] ) ){
if( isset( $transdata['paypal_express']['result']['PAYMENTINFO_0_TRANSACTIONID'] ) ){
$data[ 'TRANSACTIONID' ] = $transdata['paypal_express']['result']['PAYMENTINFO_0_TRANSACTIONID'];
}
}
return $data;
});
<?php
/**
* Send All PayPal Transaction data to Zapier when using Caldera Forms PayPal Express and Caldera Forms Zapier
*/
add_filter( 'cf_zapier_data', function( $data) {
global $transdata;
if( isset( $transdata['paypal_express'], $transdata['paypal_express']['result'] ) ){
$data[ 'paypal' ] = $transdata['paypal_express']['result'];
}
return $data;
});
@vincevanmeer

This comment has been minimized.

Copy link

@vincevanmeer vincevanmeer commented Dec 13, 2017

Line 8 should be
$data[ 'paypal' ] = $transdata['paypal_express']['result'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.