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_community_tickets_before_the_payment_options', function () { | |
if ( ! isset( $_POST['paypal_account_email'] ) ) { | |
return; | |
} | |
$meta = Tribe__Events__Community__Tickets__Payment_Options_Form::get_meta( get_current_user_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 | |
add_filter( 'woocommerce_product_export_delimiter', function ( $delimiter ) { | |
// set your custom delimiter | |
$delimiter = '.'; | |
return $delimiter; | |
} ); |
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_community_event_created', 'rt_ce_auto_add_cat_for_submission' ); | |
function rt_ce_auto_add_cat_for_submission( $event_id ) { | |
$tribe_ecp = Tribe__Events__Main::instance(); | |
// replace with your required category ID. | |
$cat_ids = [ 20 ]; // for multiple values add like this [ 20, 21 ] | |
wp_add_object_terms( $event_id, $cat_ids, $tribe_ecp->get_event_taxonomy() ); |
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 | |
// Allow (safe) HTML for ticket descriptions. | |
add_action( 'event_tickets_after_save_ticket', function( $post_id, $ticket, $raw_data, $class ) { | |
$post = get_post( $ticket->ID, ARRAY_A ); | |
$post['post_excerpt'] = $raw_data['ticket_description']; | |
wp_update_post( $post ); | |
}, 20, 4 ); |
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_loaded', 'rt_et_remove_default_block_editor_template', 99 ); | |
function rt_et_remove_default_block_editor_template(){ | |
remove_action( 'admin_init', array( tribe('tickets.editor'), 'add_tickets_block_in_editor' ) ); | |
} |
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_set_default_qty_load_js', function ( $should_load ) { | |
$post = get_post(); | |
if ( empty( $post ) ) { | |
return $should_load; | |
} |
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( 'init', 'rt_et_add_event_schedule_for_attendee_report', 99 ); | |
function rt_et_add_event_schedule_for_attendee_report() { | |
remove_action( 'tribe_tickets_attendees_event_details_list_top', [ | |
Tribe__Events__Event_Tickets__Main::instance()->attendees_report(), | |
'event_details_top', | |
] ); |
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 Order action | |
add_filter( 'woocommerce_order_actions', 'rt_add_regenerate_action_for_et' ); | |
function rt_add_regenerate_action_for_et( $actions ) { | |
$actions['tribe_force_regenerate_ticket'] = __( 'Regenerate Attendees' ); | |
return $actions; | |
} |
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 Ticket Description in the Ticket Email | |
*/ | |
add_action( 'tribe_tickets_ticket_email_after_details', 'rt_render_ticket_desc_in_email', 10, 2 ); | |
function rt_render_ticket_desc_in_email( $ticket, $event ) { |
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_get_ticket_max_purchase', 'rt_limit_max_purchase_et', 20, 2 ); | |
function rt_limit_max_purchase_et( $limit, $ticket ) { | |
$new_limit = 5; | |
if ( $limit < $new_limit ) { | |
return $limit; |