Last active
April 12, 2017 21:56
-
-
Save barryhughes/13b814cf679a3e7e2ee4 to your computer and use it in GitHub Desktop.
Remove payment options link from frontend
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 | |
/** | |
* Remove the "Payment Options" link from the My List view of Community Events. | |
* | |
* This is useful to avoid confusion for end users of the site if PayPal, split | |
* payments etc are not in use. | |
*/ | |
function remove_cet_fe_payment_opts_link() { | |
if ( ! class_exists( 'Tribe__Events__Community__Tickets__Main' ) ) return; | |
$router_object = Tribe__Events__Community__Tickets__Main::instance()->routes['payment-options']; | |
remove_action( 'tribe_ce_after_event_list_top_buttons', array( $router_object, 'link' ) ); | |
} | |
add_action( 'wp_loaded', 'remove_cet_fe_payment_opts_link' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment