daily pastebin goal
68%
SHARE
TWEET

Hide user_email using no-user booking mode and Assign bookin

eventsmanager Apr 7th, 2015 (edited) 360 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. - get_option('dbem_bookings_registration_user') This is the email you assigned as dummy user at Events > Settings > Bookings > No-user booking mode > Assign bookings to
  23. - ALL CONFIRMATION EMAIL OR BOOKING EMAILS WILL BE SEND TO THE DUMMY USER SINCE WE USED IT AS DEFAULT USER_EMAIL
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top