• Resolved psmorrow

    (@psmorrow)


    I’m interested in using a custom function to change the default values of ticket option fields:
    ticket_price,
    ticket_spaces,
    ticket_min,
    ticket_max,
    ticket_start_pub,
    start_time,
    ticket_end_pub,
    ticket_end_time
    Any help is greatly appreciated!

Viewing 1 replies (of 1 total)
  • Thread Starter psmorrow

    (@psmorrow)

    Found solution, which works great:

    function my_em_modify_default_ticket($EM_Ticket) {
            if ( empty($EM_Ticket->ticket_id) ) {
                //you can modify any property in $EM_Ticket such as spaces or the ticket name, add or delete lines as necessary
                $EM_Ticket->ticket_spaces = 1; //ticket spaces
                $EM_Ticket->ticket_name = 'Custom Ticket Name';  //ticket name
                $EM_Ticket->ticket_description = 'Ticket Description';  //ticket description
                $EM_Ticket->ticket_price = 1; //ticket price
                //etc.
            }
    }
    add_filter('em_ticket', 'my_em_modify_default_ticket', 10, 2);
    
    
Viewing 1 replies (of 1 total)
  • The topic ‘change default values’ is closed to new replies.