Skip to content

Instantly share code, notes, and snippets.

@webaware
Created December 22, 2014 01:51
Show Gist options
  • Save webaware/fbaf2227f551900d4509 to your computer and use it in GitHub Desktop.
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
<?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