• Resolved reubenbrown13

    (@reubenbrown13)


    I am working with both the-events-calendar and the event-tickets plugin. I want to setup a href just under the title of an event so that I can click to to jump down to the RSVP section if desired. The only issue I am having is how to incorporate some if-else logic so that the link only shows if the tickets plugin is installed and active.

    How do I go about checking this. I am looking through the code now, and I don’t seen anything in the-events-calendar that references the event-tickets plugin to see if it’s installed.

    Thank you for the help.

    https://wordpress.org/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Brian

    (@brianjessee)

    Hi,

    Thanks for using our plugins.

    You can do a class check like this and it will be true if Event Tickets is Active:

    if ( class_exists( 'Tribe__Tickets__Main' ) {
    
    }

    Does that work?

    Thread Starter reubenbrown13

    (@reubenbrown13)

    Thanks Brian. I changed it to use : if ( class_exists( ‘Tribe__Tickets__RSVP’ )) and things are good now. Would it be possible to roll up this feature w/in the 2 plugins? I can fork the code and do a pull request.

    Plugin Contributor Brian

    (@brianjessee)

    Hi,

    It is possible, but usually would like more people to request a feature before adding it. Especially on the front end.

    You can try with Events Tickets:

    https://github.com/moderntribe/event-tickets

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to work on the code?’ is closed to new replies.