+VAT after ticket price in list view not displaying after Avada update

Home Forums Ticket Products Event Tickets Plus +VAT after ticket price in list view not displaying after Avada update

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1015804
    Carl
    Participant

    Hello,

    I am having an issue adding +VAT to woocommerce tickets in the new events calendar list view with the Avada 3.8.7 update. Before I would add the following code to tickets.php: echo $this->get_price_html( $product ) .”+VAT”; and +VAT would appear next to the ticket price in the calendar list format.

    However, with the latest Avada update the +VAT is not appearing any more.

    +VAT before Avada update

    +VAT after Avada update

    Thanks in advance

    #1016028
    Nico
    Member

    Hi Carl,

    Thanks for getting in touch, I’ll try to help you getting this right!

    Add the following snippet to the theme’s functions.php -or use a child theme-, it should do the trick:


    function verbatim_cost_field( $cost, $post_id ) {
    return esc_html( $cost . ' + VAT');
    }
    add_filter( 'tribe_get_cost', 'verbatim_cost_field', 20, 2 );

    Please let me know if this works as expected,
    Best,
    Nico

    #1016147
    Carl
    Participant

    Hi Nico,

    This works, however it adds +VAT even when there isn’t a price.

    Thanks

    #1016393
    Nico
    Member

    Hey Carl,

    Thanks fro the feedback on this, I’ve added a check to see if there’s actually a cost to be returned and if this is different from ‘Free’.


    function verbatim_cost_field( $cost, $post_id ) {
    if ( $cost != '' && $cost != 'Free' ) $cost = $cost . ' + VAT';
    return esc_html( $cost );
    }
    add_filter( 'tribe_get_cost', 'verbatim_cost_field', 20, 2 );

    Give the updated snippet a try and let me know about how it goes,
    Best,
    Nico

    #1016460
    Carl
    Participant

    Hi Nico, thanks for your help ๐Ÿ™‚ This has worked now. Thank you!!

    #1016604
    Nico
    Member

    Glad to hear Carl ๐Ÿ™‚

    Iโ€™ll go ahead and close out this thread, but if you need help with anything else please donโ€™t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘+VAT after ticket price in list view not displaying after Avada update’ is closed to new replies.