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 | |
add_filter( 'woocommerce_product_export_delimiter', function ( $delimiter ) { | |
// set your custom delimiter | |
$delimiter = '.'; | |
return $delimiter; | |
} ); |
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 | |
add_filter( 'tribe_events_tickets_attendees_table_column', 'tec_et_csv_override_checkbox_patch', 99, 3 ); | |
function tec_et_csv_override_checkbox_patch( $existing, $item, $column ) { | |
$meta_data = get_post_meta( $item['attendee_id'], Tribe__Tickets_Plus__Meta::META_KEY, true ); | |
/** | |
* Allow plugins to remove support for checkbox field values being displayed or override the text shown. | |
* | |
* @since 4.10.4 |
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 | |
add_filter( | |
'tribe_events_archive_get_args', | |
function ( $args, $data, $request ) { | |
// If the API key is present that means the request is coming from App and we should not hide upcoming events. | |
if ( isset( $request['api_key'] ) ) { | |
$args['hide_upcoming'] = false; | |
// Include private events in the response. | |
$args['status'] = [ 'publish', 'private' ]; |
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 | |
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 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 | |
/** | |
* Plugin Name: ET Fatal Test Plugin | |
* Description: Testing ET 5.8.0 fatal with 3rd party integrations | |
*/ | |
defined( 'ABSPATH' ) || exit; | |
add_action( | |
'template_redirect', |
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 | |
add_filter( 'tec_tickets_emails_template_args', function( $args ) { | |
if ( isset( $args['json_ld'] ) ) { | |
unset( $args['json_ld'] ); | |
} | |
return $args; | |
} ); |
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 | |
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 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 | |
$ticket_id = 999; | |
$provider = tribe_tickets_get_ticket_provider( $ticket_id ); | |
$attendee_data = [ | |
'title' => 'Generated Attendee 1', | |
'full_name' => 'A test attendee', | |
'email' => 'attendee@test.com', | |
]; |
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 | |
$tribe_attendees = tribe_attendees('restv1')->where( 'event', $post_id )->where( 'order_status', 'public' )->fields( 'ids' )->all(); | |
?> | |
//Generated SQL | |
SELECT | |
wp_posts.ID | |
FROM |
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 | |
add_action( 'init', 'rt_et_bust_cache_varnish_pantheon' ); | |
function rt_et_bust_cache_varnish_pantheon() { | |
/* | |
* Set or replace $regex_path_patterns accordingly. | |
* | |
* We don't set this variable for you, so you must define it | |
* yourself per your specific use case before the following conditional. |
NewerOlder