Created
February 26, 2018 22:00
-
-
Save joshfeck/c200ab21043e578725bd8fcd903c4673 to your computer and use it in GitHub Desktop.
Example code for when two or more tickets being bought have a note that says, “Please ensure the correct information is entered for each participant”
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', 'my_add_inline_script_ts_multiple_ticket_select', 20); | |
function my_add_inline_script_ts_multiple_ticket_select() { | |
$custom_js = 'jQuery(document).ready(function($){ | |
$(".ticket-selector-tbl-qty-slct").change(function(){ | |
if($(this).val() >= 2) | |
alert("Please ensure the correct information is entered for each participant"); | |
});});'; | |
wp_add_inline_script('ticket_selector', $custom_js); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment