Advertisement
eventsmanager

Modfiry default ticket options

Jul 17th, 2015
1,650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  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);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement