Support » Plugin: Events Manager » [Plugin: Events Manager] Can Ticket Info be extended?

Viewing 7 replies - 1 through 7 (of 7 total)
  • OK, no one responded, so I was able to add a field and will share how I did it so if there’s a better way, it can be pointed out:
    1. I added a new em_tickets_ext extension table with the event_id, ext_id, etc.
    2. Added my new extension class modeled from em-ticket.php and added logic to select, update and delete from my new table
    3. added add_action(’em_ticket_save’,’my_em_styles_ticket_save’,1,2); to save to my new table.
    4. added add_action(’em_ticket’,’my_em_styles_ticket_load’,1,2); which does a select on my new table to get my fields and add them to the $EM_Tickt object
    5. Added a new input element for my new field to tickets-form.php

    Does it work without any conflicts to other class? also be sure that you put it in other file so that it will not be overwritten during version update.

    Although I haven’t done extensive testing, all other functionality appears to be working fine. Thanks for your recommendation. I noticed that bookings have a booking_meta column that can be used to store custom information. That would be a great addition to the ticket as well, so I wouldn’t need to add my own table.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    I advise you check out http://wp-events-plugin.com/tutorials/ to learn how to use the em_meta table instead

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    I advise you check out http://wp-events-plugin.com/tutorials/ to learn how to use the em_meta table instead

    Thanks Marcus. Makes sense. I’m assuming em_ticket and em_ticket_save are the correct hooks to use for loading and saving data to em_meta at the ticket level.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    yes, exactly (and em_ticket_get_post/em_ticket_validate too to retrieve the post data before saving, although i guess you could do it during save if you don’t want to validate it).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Events Manager] Can Ticket Info be extended?’ is closed to new replies.