SHARE
TWEET

Modfiry default ticket options

eventsmanager Jul 17th, 2015 656 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 initial values/settings of a default ticket.
  9.  * @param EM_Ticket $EM_Ticket
  10.  */
  11. function my_em_modify_default_ticket($EM_Ticket) {
  12.         if ( empty($EM_Ticket->ticket_id) ) {
  13.             //you can modify any property in $EM_Ticket such as spaces or the ticket name, add or delete lines as necessary
  14.             $EM_Ticket->ticket_spaces = 999; //ticket spaces
  15.             $EM_Ticket->ticket_name = 'Custom Ticket Name';  //ticket name
  16.             $EM_Ticket->ticket_description = 'Custom Ticket Description';  //ticket description
  17.             $EM_Ticket->ticket_price = 100; //ticket price
  18.             //etc.
  19.         }
  20. }
  21. add_filter('em_ticket', 'my_em_modify_default_ticket', 10, 2);
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