Created
December 22, 2014 01:51
-
-
Save webaware/fbaf2227f551900d4509 to your computer and use it in GitHub Desktop.
Make sure that Gravity Forms PDF has a chance to run when Gravity Forms DPS PxPay processes transaction returns and confirmations
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 | |
/** | |
* Include the Gravity Forms PDF Extended class if the GFDPSPXPAY plugin is listening to a return URL (IPN-style) | |
*/ | |
function pdf_init_gfdpspxpay() { | |
if (class_exists('GFPDF_Core') && empty($GLOBALS['gfpdf'])) { | |
global $gfpdf; | |
$gfpdf = new GFPDF_Core(); | |
} | |
} | |
add_action('gfdpspxpay_process_return', 'pdf_init_gfdpspxpay'); | |
add_action('gfdpspxpay_process_confirmation', 'pdf_init_gfdpspxpay'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment