SHARE
TWEET

Modify default event total spaces

eventsmanager Jul 15th, 2015 (edited) 287 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. for more information on adding this snippet to your site, see here
  4. http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  5. */
  6.  
  7. /**
  8.  * Changes the default total spaces available for booking when creating a new event.
  9.  * @param EM_Event $EM_Event
  10.  */
  11. function my_em_default_total_spaces($EM_Event) {
  12.     if( empty($EM_Event->event_id) ){
  13.         $EM_Event->event_spaces = 30; //set the default Total Spaces you'd like here
  14.     }  
  15. }
  16. add_action('em_event', 'my_em_default_total_spaces', 10, 1);
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top