Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created August 7, 2017 18:19
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/e253df387ddd710cb739338d20065f4a to your computer and use it in GitHub Desktop.
Save joshfeck/e253df387ddd710cb739338d20065f4a to your computer and use it in GitHub Desktop.
Disable the View cart input. Event Espresso 4 + Multi Event Registration add-on.
<?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', 'my_ee_disable_view_cart', 11 );
function my_ee_disable_view_cart() {
wp_add_inline_script(
'espresso_multi_event_registration',
'function disableViewCart(){
jQuery("input[value=\'View Event Cart\']").prop("disabled", true);
}
jQuery(document).ready(disableViewCart);
jQuery(document).ajaxComplete(disableViewCart);'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment