Advertisement
eventsmanager

Hide user_email using no-user booking mode and Assign bookin

Apr 7th, 2015
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. ###############################################################################################
  2. ### This snippet will hide the user_email for guest users and will use the dummy user email ###  
  3. ### user email instead when using No-user booking mode                                      ###
  4. ###############################################################################################
  5.  
  6. 1. go to your theme directory at wp-content > themes > Your Theme Name
  7. 2. edit footer.php and then add this jquery snippet
  8.  
  9. <?php if ( !is_user_logged_in() ){ ?>
  10. <script>
  11. jQuery(document).ready( function($){
  12.     jQuery('#user_email').val("xx@xyz.com");
  13.     jQuery('#user_email').css('display','none');
  14.     jQuery('.input-user_email').css('display','none');
  15. });
  16. </script>
  17. <?php } ?>
  18.  
  19. Notes:
  20.  
  21. - user_email is the user email field name under Events > Forms Editor > 'Booking Form - General Information'
  22. - ALL CONFIRMATION EMAIL OR BOOKING EMAILS WILL BE SEND TO THE DUMMY USER SINCE WE USED IT AS DEFAULT USER_EMAIL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement