Created
September 25, 2019 18:38
-
-
Save joshfeck/c553d579962480410be45f51df074144 to your computer and use it in GitHub Desktop.
An example that shows how to conditionally not include a registration form question when a specific ticket is in the cart. Event Espresso 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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( 'wp_enqueue_scripts', 'rc_ee_hide_custom_questions_convention', 99 ); | |
function rc_ee_hide_custom_questions_convention() { | |
wp_add_inline_script( | |
'single_page_checkout', | |
'jQuery( document ).ready( function( $ ) { | |
if($("#spco-attendee_information-dv").find(".spco-attendee-ticket-910").length !== 0) { | |
$(".ee-reg-qstn-34-input-dv").hide(); | |
} | |
});' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment