Event price not showing

Home Forums Ticket Products Event Tickets Plus Event price not showing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #702247
    Caroline
    Participant

    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?

    #703562
    Barry
    Member

    Hi!

    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?

    #703792
    Caroline
    Participant

    Hi,
    Yes I added it as customisation to change the layout. Here’s the code (line 53): http://pastebin.com/DWiz4Qa3

    I 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.

    #704024
    Barry
    Member

    OK, 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.

    #704387
    Caroline
    Participant

    I’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! 🙂

    #705010
    Barry
    Member

    Sure 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?

    #705713
    Caroline
    Participant

    Thanks!

    #706376
    Barry
    Member

    My 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!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Event price not showing’ is closed to new replies.