This file contains hidden or 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
// replaces line 24 of gateways/paypal/paypal_ipn.php | |
if (empty($_POST['ipn_track_id']) && ($_POST['payment_status'] == 'Completed' || $_POST['payment_status'] == 'Pending')) { | |
$payment_data['txn_details'] = serialize($_POST); | |
$payment_data['txn_id'] = $_POST['txn_id']; | |
$payment_data['payment_status'] = 'Pending'; | |
} elseif ($myPaypal->validateIpn()) { | |
// replaces line 12 on gateways/paypal/init.php, to add the second line in | |
add_filter('filter_hook_espresso_transactions_get_payment_data', 'espresso_process_paypal'); | |
add_filter('filter_hook_espresso_thank_you_get_payment_data', 'espresso_process_paypal'); |
This file contains hidden or 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 htrappfae_remove_paypal_from_event($payment_data) { | |
extract( $payment_data ); | |
if ( $event_id==74 ) { //check to see if this is the event with the ID of #74 | |
remove_action( 'action_hook_espresso_display_offsite_payment_gateway', 'espresso_display_paypal' ); | |
} | |
} | |
add_action ( 'action_hook_espresso_display_offsite_payment_gateway', 'htrappfae_remove_paypal_from_event', 9 ); |
NewerOlder