Created
September 30, 2013 19:24
-
-
Save joshfeck/6768792 to your computer and use it in GitHub Desktop.
This will make it so that the PayPal button does not display when registering for a specific event. In this example, the event ID is 74. You'll need to swap in your event ID that you don't want the PayPal button to appear for.
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 | |
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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment