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 | |
/** | |
* Custom reset for attendee deletion count if all attendees are deleted | |
*/ | |
add_action( 'tickets_rsvp_ticket_deleted', 'rt_reset_deleted_data_if_attendee_not_available', 20, 3 ); | |
function rt_reset_deleted_data_if_attendee_not_available( $ticket_id, $event_id, $product_id ) { | |
$total_attendees = Tribe__Tickets__Tickets::get_event_attendees_count( $event_id ); |
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 | |
/** | |
* Filter default login URL for Tickets and RSVP | |
*/ | |
add_filter( 'tribe_tickets_ticket_login_url', 'rt_et_custom_login_url' ); | |
function rt_et_custom_login_url( $url ) { | |
$parts = wp_parse_url( $url ); |
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 | |
add_filter( 'tribe_ext_events_control_online_label', function( $label ) { | |
return 'FaceBook'; | |
}, 10, 1 ); |
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 | |
/** | |
* Add Custom Field in User Profile to allow Direct Publish for Community Events | |
* | |
* @author rafsuntaskin (Rafsun Chowhdury) | |
* | |
* @link https://gist.github.com/rafsuntaskin/3df62757dd2bec6694ac47e285b2ee4b | |
* | |
*/ |
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 | |
add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 ); | |
function my_community_required_fields( $fields ) { | |
if ( ! is_array( $fields ) ) { | |
return $fields; | |
} |
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 | |
add_action( 'wp', 'rt_remove_unwanted_body_class', 90 ); | |
function rt_remove_unwanted_body_class() { | |
if ( ! tribe_is_event() ) { | |
remove_filter( 'body_class', [ tribe( Tribe\Events\Views\V2\Hooks::class ), 'filter_body_class' ] ); | |
remove_action( 'wp_footer', [ tribe( 'asset.data' ), 'render_json' ] ); | |
} | |
} |
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 | |
add_action( 'tribe_events_community_event_submission_login_form', 'rt_ce_custom_login_redirect', 10 ); | |
add_action( 'tribe_tribe_events_community_event_list_login_form', 'rt_ce_custom_login_redirect', 10 ); | |
function rt_ce_custom_login_redirect() { | |
$redirect_url = site_url(); //replace site_url with your login url i.e "mywebsite.com/login" | |
wp_safe_redirect( $redirect_url ); | |
} |
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
[ | |
{ | |
"name": "", | |
"date": "", | |
"tec": "", | |
"pro": "", | |
"fib": "", | |
"ebt": "", | |
"apm": "", | |
"eti": "", |
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 | |
add_filter( 'tribe_tickets_checkout_urls', 'rt_tc_add_slash_in_url', 20 ); | |
add_filter( 'tribe_tickets_cart_urls', 'rt_tc_add_slash_in_url', 20 ); | |
add_filter( 'tribe_tickets_tribe-commerce_cart_url', 'rt_tc_add_slash_in_url', 20 ); | |
function rt_tc_add_slash_in_url( $urls ) { | |
if ( is_array( $urls ) && isset( $urls['Tribe__Tickets__Commerce__PayPal__Main'] ) ) { | |
$urls['Tribe__Tickets__Commerce__PayPal__Main'] = $urls['Tribe__Tickets__Commerce__PayPal__Main']. '/'; |
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 | |
//remove the original filter | |
add_action( 'wp', 'rt_et_remove_tribe_filter', 99 ); | |
function rt_et_remove_tribe_filter() { | |
$woo_cart = tribe( 'tickets-plus.commerce.woo.cart' ); | |
remove_filter( 'woocommerce_get_checkout_url', [ | |
$woo_cart, | |
'maybe_filter_checkout_url_to_attendee_registration' |