Home › Forums › Ticket Products › Event Tickets Plus › WooSubscriptions and WooCommerce Tickets
- This topic has 4 replies, 2 voices, and was last updated 9 years, 6 months ago by Barry.
-
AuthorPosts
-
August 25, 2014 at 3:06 pm #699459CarolineParticipant
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?
August 25, 2014 at 8:57 pm #700075BarryMemberHi – 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 🙂
August 26, 2014 at 6:04 am #701138CarolineParticipantHey,
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.August 26, 2014 at 7:48 am #701329BarryMemberExcellent, sounds like you’re on track 🙂
September 9, 2014 at 8:06 am #733266BarryMemberHi! 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!
-
AuthorPosts
- The topic ‘WooSubscriptions and WooCommerce Tickets’ is closed to new replies.