Last active
December 13, 2017 20:56
-
-
Save Shelob9/8af14558d386ec1f563309c668a38ed3 to your computer and use it in GitHub Desktop.
Example code for cf_zapier_data filter. See: https://calderaforms.com/doc/cf_zapier_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 | |
/** | |
* 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; | |
}); |
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 | |
/** | |
* 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; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 8 should be
$data[ 'paypal' ] = $transdata['paypal_express']['result'];