Currency Symbol not showing

Home Forums Ticket Products Event Tickets Plus Currency Symbol not showing

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #935534
    prydonian
    Participant

    When I create an event and add a ticket using the WC section, the currency symbol does not appear (eg: 12 instead of £12) in either the details box underneath the event description or the info box in the list view.

    The currency symbol does appear when using EventBrite though.

    #935759
    Barry
    Member

    Hi prydonian,

    Sorry you’re hitting difficulties – please bear with me while I dig into this a little.

    Thanks for your patience!

    #935765
    prydonian
    Participant
    #935796
    Barry
    Member

    Possibly.

    I’m curious: what is the default currency symbol in your Events Settings screen? Can you also try adding this snippet to your theme’s functions.php file, resave the event(s) in question and see if that helps?

    add_action( 'save_post_tribe_events', 'force_cost_update' );
    
    function force_cost_update( $event_id ) {
       TribeEventsAPI::update_event_cost( $event_id );
    }
    #935798
    prydonian
    Participant

    Default currency is set to £ (GBP)

    That didn’t help.

    #935881
    Barry
    Member

    Hi prydonian: can I confirm one more thing?

    When I create an event and add a ticket using the WC section, the currency symbol does not appear (eg: 12 instead of £12) in either the details box underneath the event description or the info box in the list view.

    Does it appear as expected within the single event post?

    Thanks for your patience as we work through this 🙂

    #935887
    prydonian
    Participant

    This is what I’m seeing:

    full event view

    list view

    It only happens with the WC events, not the EB events. The 12 in each case should be £12.

    #936224
    Barry
    Member

    Once again, we appreciate your patience!

    So there does seem to be a bug here and it looks as though if an event has a (WooCommerce) ticket attached but no Eventbrite tickets, unfortunately our Eventbrite plugin may still try to modify the cost and – inadvertently – cause the currency symbol to be stripped.

    I’ve reported this and we’ll try to get a fix out as quickly as we can, but please be aware it may realistically be a couple of releases away (or more).

    In the meantime, then, could you try utilizing the following snippet – which you could add to your theme’s functions.php file, for instance – and see if that provides some temporary relief?

    class TicketingCostConflict {
    	static $original_cost;
    
    	static function resolve() {
    		add_filter( 'tribe_get_cost', array( __CLASS__, 'store_pre_eb' ), 5 );
    		add_filter( 'tribe_get_cost', array( __CLASS__, 'maybe_undo_eb_change' ), 50, 2 );
    	}
    
    	static function store_pre_eb( $cost ) {
    		self::$original_cost = $cost;
    	}
    
    	static function maybe_undo_eb_change( $cost, $event_id ) {
    		if ( ! class_exists( 'Event_Tickets_PRO' ) ) return $cost;
    		if ( Event_Tickets_PRO::instance()->getEventId( $event_id ) ) return $cost;
    		return self::$original_cost;
    	}
    }
    
    TicketingCostConflict::resolve();

    All it aims to do is reverse the effects of the Eventbrite Tickets plugin on the cost field, for those events where no Eventbrite tickets are attached.

    Does that help at all?

    #936642
    prydonian
    Participant

    That appears to have worked. Thanks!

    #936693
    Barry
    Member

    Glad we got there – and our apologies for the inconvenience.

    I’ll close this topic for the time being however I’ve linked it to the bug report on our internal issue tracker and once we make headway on a substantive fix we’ll do our best to re-open this and post an update so you can remove the snippet 🙂

    If we can help with anything else, of course, please don’t hesitate to create new topics as needed.

    Thanks again!

    #965781
    Leah
    Member

    Hi there,

    Thanks again for your post. We wanted to get in touch and let you know that although we weren’t able to address this issue in our upcoming 3.10 release, it is still very much a priority. We have a ticket in our system and will be investigating a solution to be released in a future version. Thank you for your patience and support while we work on this!

    Cheers,
    The Events Calendar Team

    #988035
    Leah
    Member

    Hello,

    Thank you again for bringing this issue to our attention. We’re happy to say that we have added a fix for this into our upcoming version 3.11 release. Keep an eye on your Updates page for the new version. If you have any trouble with the update (or are still seeing this problem after you update) please start a new thread and we’d be happy to help out.

    Thank you for your patience while we got this release ready to go!

    Best,
    Leah
    and the rest of The Events Calendar team

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Currency Symbol not showing’ is closed to new replies.