Home › Forums › Ticket Products › Event Tickets Plus › Event price not showing
- This topic has 7 replies, 2 voices, and was last updated 9 years, 8 months ago by Barry.
-
AuthorPosts
-
August 26, 2014 at 2:51 pm #702247CarolineParticipant
I’ve been using the tribe_get_cost() function to show the price of an event on single-event.php.
For some reason it’s stopped working. Any ideas why this might be?August 27, 2014 at 2:45 am #703562BarryMemberHi!
I’m going to move this from pre-sales over to the WooCommerce forum as that seems a more appropriate home for this one, given your license type 🙂
I’ve been using the tribe_get_cost() function to show the price of an event on single-event.php.
So do you mean you added it as a customization? Can you share your custom template code (via Pastebin, Gist or similar) if so?
Also, just to clarify (as I note you are a WooCommerce Tickets user) how have you defined the price for the event? Are you expecting the ticket price to come through?
August 27, 2014 at 4:56 am #703792CarolineParticipantHi,
Yes I added it as customisation to change the layout. Here’s the code (line 53): http://pastebin.com/DWiz4Qa3I defined the price of the ticket in the ‘Tickets’ section of the post page. Then I check it in the ‘Products’ section of WooCommerce. The price used to appear on the page, so I’m not sure why isn’t working now.
August 27, 2014 at 7:26 am #704024BarryMemberOK, thanks for clarifying.
At present tribe_get_cost() does not return the cost of any tickets that might have been set up using plugins like WooCommerce Tickets.
Once a ticketing plugin is active, the default cost field that is normally visible in the event editor actually becomes hidden: the goal of this is to avoid confusion, but it’s possible to reinstate it and we can explore that if you think it would be useful to do so.
With regards to what you’ve described, is it possible that – prior to installing and activating WooCommerce Tickets – you had set up prices for previous events using the default cost field? That might explain what you’ve detailed here.
August 27, 2014 at 10:22 am #704387CarolineParticipantI’m certain I installed and customised the templates for both plugins at the same time. It would be really useful if it’s possible to reinstate tribe_get_cost() when WooTickets is active, as the price field in tickets.php is tricky to style without ruining the customised layout.
Thanks! 🙂
August 27, 2014 at 4:38 pm #705010BarryMemberSure thing. So adding this snippet to your theme’s functions.php file:
add_filter( 'tribe_events_admin_show_cost_field', '__return_true', 100 );
Ought to restore the regular cost field. If you then simply set it per event you should see the cost displaying as before.
Does that help?
August 28, 2014 at 12:49 am #705713CarolineParticipantThanks!
August 28, 2014 at 6:44 am #706376BarryMemberMy pleasure 🙂
I’ll go ahead and close this thread but if we can help with anything else please don’t hesitate to create a new thread and one of the team will be only too happy to assist.
Also – if you have a moment to spare – we’d also love to hear your thoughts on The Events Calendar over on our plugin review page. Thanks again!
-
AuthorPosts
- The topic ‘Event price not showing’ is closed to new replies.