Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created September 30, 2013 19:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/6768792 to your computer and use it in GitHub Desktop.
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.
<?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