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
/** | |
* Change the RSVP Confirmation Message | |
* | |
* @param string $translation The translated text. | |
* @param string $text The text to translate. | |
* @param string $domain The domain slug of the translated text. | |
* @param string $context The option context string. | |
* | |
* @return string The translated text or the custom text. | |
*/ |
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
/** | |
* Change the Get Tickets and RSVP Now on List View and Single Events by Context | |
* | |
* @param string $translation The translated text. | |
* @param string $text The text to translate. | |
* @param string $context The option context string. | |
* @param string $domain The domain slug of the translated text. | |
* | |
* @return string The translated text or the custom text. |
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
/** | |
* Change the Get Tickets and RSVP Now on List View and Single Events | |
* | |
* @param string $translation The translated text. | |
* @param string $text The text to translate. | |
* @param string $domain The domain slug of the translated text. | |
* @param string $context The option context string. | |
* | |
* @return string The translated text or the custom text. | |
*/ |
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: HubSpot Clear Plugin | |
Plugin URI: http://tri.be | |
Version: .5 | |
Activate the plugin to clear the HubSpot Delivery Queue. | |
Deactivate the plugin immediately after it has been activated. |
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
$event_date = date( 'Y-m-d', current_time( 'timestamp' ) ); | |
$beginning_of_day = strtotime( tribe_beginning_of_day( $event_date ) ); | |
$events_query = tribe_events()->where( 'date_overlaps', $beginning_of_day, tribe_end_of_day( $event_date ) )->get_query(); | |
// create an array of post objects | |
$events_arr = $events_query->get_posts(); | |
// creates an array of event ids | |
$event_ids = tribe_events()->where( 'date_overlaps', $beginning_of_day, tribe_end_of_day( $event_date ) )->get_ids(); |
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
add_action( 'cctor_click_actions', 'cctor_pro_after_counter_msg', 15, 2 ); | |
function cctor_pro_after_counter_msg( $coupon_id, $coupon_expiration = null ) { | |
if ( ! is_singular( Cctor__Coupon__Main::POSTTYPE ) ) { | |
return false; | |
} | |
if ( ! is_object( $coupon_expiration ) ) { | |
return false; | |
} |
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
/** | |
* Function adds a BCC header to emails that match our array | |
* | |
* based off snippet from https://jessepearson.net/2016/10/adding-bcc-emails-woocommerce/ | |
* | |
* @param string $headers The default headers being used | |
* @param string $object The email type/object that is being processed | |
*/ | |
function tribe_add_bcc_to_certain_emails( $headers, $object ) { |
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
/** | |
* Prevent Sales Tax For Tickets under a certain Event or Post ID | |
*/ | |
add_filter( 'tribe_tickets_commerce_paypal_add_to_cart_args', 'tribe_add_tax_rate_to_paypal_transaction', 10, 3 ); | |
function tribe_add_tax_rate_to_paypal_transaction( $args, $php_post, $post ) { | |
// change 15713 to the event or post id with the tickets that should not collect sales tax | |
if ( $post->ID === 15713 ) { | |
$args['tax_rate'] = '00.00'; | |
} |
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
/** | |
* Change Delay of Ticket Creation to Now | |
*/ | |
add_filter( 'tribe_ticket_generation_delay', 'jp_filter_delay' ); | |
function jp_filter_delay( $timestamp ) { | |
return date( 'm/d/Y h:i:s a', current_time( 'timestamp' ) ); | |
} |
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
/** | |
* Load Loop Shortcode in Header if Found in Content | |
* https://wordpress.stackexchange.com/a/207749 | |
*/ | |
add_action( 'wp_enqueue_scripts', 'cctor_load_resources' ); | |
function cctor_load_resources() { | |
global $post, $wpdb; | |
// determine whether this page contains "couponloop" shortcode | |
$shortcode_found = false; |