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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( 'template_redirect', 'tw_add_ee_calendar_assets' ); | |
function tw_add_ee_calendar_assets() { | |
// change is_page() parameter to match your calendar page slug | |
if ( class_exists( 'EED_Espresso_Calendar' ) && is_page( 'whats-on' ) ) { | |
global $is_espresso_calendar; | |
$is_espresso_calendar = TRUE; | |
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) ); |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( 'AHEE_event_editor_questions_notice', 'my_custom_checkboxes_for_additional_question_groups' ); | |
function my_custom_checkboxes_for_additional_question_groups() { | |
echo '<script>jQuery( | |
"#espresso_events_Registration_Form_Hooks_Extend_additional_questions_metabox input[value=\'1\']" | |
) | |
.prop( "checked", true );</script>'; | |
} |
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('AHEE__thank_you_page_overview_template__top', 'tw_filter_thank_you_text_based_on_pm'); | |
function tw_filter_thank_you_text_based_on_pm($transaction) { | |
$payment_method = $transaction->payment_method(); | |
if($payment_method instanceof EE_Payment_Method) { | |
if($payment_method->type() == 'Invoice') { | |
add_filter('FHEE__thank_you_page_overview_template__order_conf_desc', 'tw_filter_thank_you_text_for_invoice'); | |
} |
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 //Do not include the opening PHP tag if you already have one | |
add_filter('FHEE__Read__create_model_query_params', 'tw_ee_set_ee_rest_datetime_order_by', 10, 3); | |
function tw_ee_set_ee_rest_datetime_order_by( $model_query_params, $query_params, $model ) { | |
if($model instanceof EEM_Datetime) { | |
// Match default order_by array to compare. | |
$default_order_by['DTT_ID'] = 'ASC'; | |
// Check if the order_by currently set is the default order_by. | |
if( $default_order_by === $model_query_params['order_by']) { | |
// Order by DTT_ID => ASC so override that with DTT_EVT_Start => DESC |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( | |
'wp_enqueue_scripts', | |
'tw_ee_change_default_ee_country_and_state_option', | |
20 | |
); | |
function tw_ee_change_default_ee_country_and_state_option(){ | |
$custom_js = 'jQuery(document).ready(function($){'; |
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( | |
'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', | |
'tw_ee_csv_add_ticket_base_price', | |
20, | |
2 | |
); | |
function tw_ee_csv_add_ticket_base_price( | |
array $csv_row, |
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 //Do not include the opening PHP tag if you already have one. | |
add_filter( | |
'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', | |
'tw_ee_csv_always_add_event_name', | |
20, | |
2 | |
); | |
function tw_ee_csv_always_add_event_name( | |
array $csv_row, |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function my_ee_add_currency_checkout() { | |
wp_add_inline_script( | |
'single_page_checkout', | |
'jQuery( document ).one( "ajaxStop", function() { | |
jQuery("#spco-payment-info-table") | |
.find(".spco-grand-total .total:nth-of-type(2)") | |
.append("<span>(CHF)</span>"); |
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 //Please do not include the opening PHP tag if you already have one | |
function tw_ee_remove_address_fields_from_stripe_billing_form( $options, $form ) { | |
if( $form instanceof EE_Billing_Attendee_Info_Form | |
&& isset( $options[ 'name' ] ) | |
&& $options[ 'name' ] === 'Stripe_Payment_Intent_and_Elements_Form' | |
) { | |
$fields_to_remove = array( | |
//'address', | |
//'address2', |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
/** | |
* PLEASE READ AND FOLLOW ALL INSTRUCTIONS IN CAPS | |
* | |
* IN ORDER FOR THIS TO WORK YOU NEED TO ADD A QUESTION USED FOR A TAX NUMBER | |
* | |
* BECAUSE THIS QUESTION SHOULD ONLY BE ASKED ONCE PER TRANSACTION | |
* YOU SHOULD ADD THE ABOVE QUESTION TO A GROUP ONLY ASKED FOR THE PRIMARY REGISTRANT |
NewerOlder