WooSubscriptions and WooCommerce Tickets

Home Forums Ticket Products Event Tickets Plus WooSubscriptions and WooCommerce Tickets

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #699459
    Caroline
    Participant

    I need to write an if statement to hide the tickets form on event pages from users that haven’t purchased a subscription. If a user hasn’t bought a subscription, I want to replace there form with a message and link to the page where they pay for their subscription. How do I do this?

    #700075
    Barry
    Member

    Hi – great question.

    In that case you’ll probably be interested in overriding and customizing the wootickets/tickets.php template – you can find out more about this process by reading through our Themer’s Guide – but essentially you would copy the template of that name from the WooCommerce Tickets plugin directory and place the copy in your theme at a path something like this:

    your-theme/tribe-events/wootickets/tickets.php

    Adding your custom code to the top would probably work. I don’t know what shape that’s going to take, exactly, but essentially I imagine it would be a test to see if they don’t have a subscription – and code to display a link to the relevant page if so.

    For assistance determining what that code should be you’d need to reach out to the Woo team as unfortunately we can’t guide you through customizations relating to third party plugins.

    I do hope that gives you an outline of what changes would be needed in relation to WooCommerce Tickets, though, and of course let me know if you have any further questions 🙂

    #701138
    Caroline
    Participant

    Hey,
    I’ve figured out how to hide the form, I just need to figure out how to add an actor tag without breaking the rest of the code.

    I’ve changed Line 84 to read: if ( $is_there_any_product_to_sell && $subscription_key )
    so now the form is hidden is there no active subscription, and adding an “else” between lines 93 and 94.

    #701329
    Barry
    Member

    Excellent, sounds like you’re on track 🙂

    #733266
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘WooSubscriptions and WooCommerce Tickets’ is closed to new replies.