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 | |
/** | |
* Replace the file located at: src/Tickets/Commerce/Gateways/Stripe/Webhooks.php | |
**/ | |
namespace TEC\Tickets\Commerce\Gateways\Stripe; | |
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Gateway; | |
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Merchant; | |
use TEC\Tickets\Commerce\Gateways\Contracts\Abstract_Webhooks; | |
use TEC\Tickets\Commerce\Gateways\Stripe\REST\Webhook_Endpoint; |
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 | |
// patch for Ticket# GTRIA-802 | |
//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, |
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 | |
/** | |
* In some cases where the user input for purchaser name is corrputed we need to | |
* replace the purhcaser name with purchaser email. | |
*/ | |
add_filter( 'tribe_tickets_attendee_data', 'rt_et_filter_corrupted_attendee', 10, 4 ); | |
function rt_et_filter_corrupted_attendee( $attendee_data, $provider, $attendee, $post_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( 'tribe_tickets_ticket_email_attachments', 'filter_woo_pdf_attachments_by_attendee', 10, 6 ); | |
function filter_woo_pdf_attachments_by_attendee( $attachments, $post_id, $order_id, $tickets, $provider, $args ) { | |
$order = wc_get_order( $order_id ); | |
if ( ! $order ) { | |
return $attachments; |
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', 'rafsuntaskin_disable_metabox_views_on_ar_page', 2 ); | |
function rafsuntaskin_disable_metabox_views_on_ar_page() { | |
if ( isset( $_GET['tickets_provider'] ) ) { | |
remove_action( 'init', 'mb_views_load', 5 ); | |
} | |
} |
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( 'event_tickets_rsvp_ticket_created', 'etp_process_front_end_rsvp_tickets_form_data', 8 ); | |
function etp_process_front_end_rsvp_tickets_form_data() { | |
$storage = tribe( 'tickets-plus.meta.storage' ); | |
$storage->maybe_set_attendee_meta_cookie(); | |
} |
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', 'et_set_max_rsvp_purchase_limit', 10, 4 ); | |
function et_set_max_rsvp_purchase_limit( $available_at_a_time, $ticket, $event, $ticket_id ) { | |
if ( $available_at_a_time <= 1 || $ticket->provider_class != 'Tribe__Tickets__RSVP' ) { | |
return $available_at_a_time; | |
} |
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', 'etp_modify_saved_order_meta', 10, 2 ); | |
function etp_modify_saved_order_meta( $order_id, $from_status = null ) { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Meta' ) ) { | |
return; | |
} | |
$order = wc_get_order( $order_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_is_rest_api_request', 'simulate_as_not_rest' ); | |
/** | |
* Mock REST request as frontend to load cart session. | |
* | |
* Since WooCommerce 6.3.0 | |
* | |
* @param bool $is_rest_api_request | |
* @return bool |
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_qr_code_base_url', function( $url ) { | |
return site_url( '/' ); | |
} ); |