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_block_ticket_html_attributes', 'rt_et_woo_payments_fatal_fix' ); | |
function rt_et_woo_payments_fatal_fix( $attrs ) { | |
if ( ! isset( $attrs['data-ticket-price'] ) ) { | |
return $attrs; | |
} | |
$attrs['data-ticket-price'] = (string) $attrs['data-ticket-price']; |
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 | |
$regex_path_patterns = array( | |
'#^/attendee-registration/?#', | |
'#^/tickets-checkout/?#', | |
); | |
// Loop through the patterns. | |
foreach ($regex_path_patterns as $regex_path_pattern) { | |
if (preg_match($regex_path_pattern, $_SERVER['REQUEST_URI'])) { |
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_ct_fix_woo_template_conflict', 99 ); | |
function rt_ct_fix_woo_template_conflict() { | |
if ( class_exists( 'Tribe__Events__Community__Tickets__Main' ) ) { | |
remove_action( 'woocommerce_order_item_meta_start', [ Tribe__Events__Community__Tickets__Main::instance(), 'add_order_item_details' ], 10 ); | |
} | |
} |
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( 'woocommerce_order_status_changed', 'rt_ct_reset_failed_payouts', 9, 4 ); | |
function rt_ct_reset_failed_payouts( $order_id, $status_from, $status_to, $order ) { | |
global $wpdb; | |
if ( 'completed' == $status_to ) { | |
$query = $wpdb->query( "UPDATE $wpdb->posts SET post_status = 'tribe-payout-paid' WHERE post_status = 'tribe-payout-pending'" ); | |
} | |
} |
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 | |
/** | |
* Temporary fix for Fatal error when adding new order in WooCommerce with Event Tickets Plus v5.2.7 | |
*/ | |
add_action( 'init', 'rt_patch_for_attendee_regeneration', 99 ); | |
function rt_patch_for_attendee_regeneration() { | |
remove_filter( 'woocommerce_order_actions', [ tribe( 'tickets-plus.commerce.woo.regenerate-order-attendees' ), 'add_single_order_action' ] ); | |
add_filter( 'woocommerce_order_actions', 'rt_patch_regenerate_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_filter( 'tribe_asset_pre_register', 'rt_et_patch_ma_nonce', 99 ); | |
function rt_et_patch_ma_nonce( $assets ) { | |
if ( ! in_array( 'event-tickets-admin', $assets->groups ) ) { | |
return $assets; | |
} |
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_pdf_tickets_mpdf_args', function( $args ) { | |
$upload_dir = wp_upload_dir(); | |
$args['tempDir'] = $upload_dir['basedir'] . '/tmp/'; | |
return $args; | |
} ); |
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_attendees_csv_export_delimiter', 'rt_et_change_csv_export_delimiter' ); | |
function rt_et_change_csv_export_delimiter( $default ) { | |
return '.'; | |
} |
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_email_include_event_date', '__return_false' ); |
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_commerce_tickets_form_hook', function ( $hook ) { | |
return 'tribe_random_hook_to_hide_ticket_form'; | |
} ); |