Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created September 15, 2016 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshfeck/866ab9bb7d47b17e524453906d552da4 to your computer and use it in GitHub Desktop.
Save joshfeck/866ab9bb7d47b17e524453906d552da4 to your computer and use it in GitHub Desktop.
Make sure that the scripts and styles for the Multi Event Registration add-on cart are loaded on tribe_events event pages.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function my_add_mer_scripts_to_other_cpts() {
if ( 'tribe_events' == get_post_type() ) {
wp_enqueue_style(
'espresso_multi_event_registration',
apply_filters(
'FHEE__EED_Multi_Event_Registration__enqueue_scripts__event_cart_css',
EE_MER_URL . 'css' . DS . 'multi_event_registration.css'
)
);
wp_enqueue_script(
'espresso_multi_event_registration',
EE_MER_URL . 'scripts' . DS . 'multi_event_registration.js',
array( 'espresso_core' ),
EE_MER_VERSION, true
);
}
}
add_action( 'wp_enqueue_scripts', 'my_add_mer_scripts_to_other_cpts', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment