Cost issue bug with latest version

Home Forums Calendar Products Events Calendar PRO Cost issue bug with latest version

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1406560
    social-ink
    Participant

    As of our latest version, we are getting the following error:

    Warning: number_format() expects parameter 1 to be float, string given in /home/OURSITECODE/wp-content/plugins/the-events-calendar/common/src/Tribe/Cost_Utils.php on line 110

    Looking at that function (maybe_replace_cost_with_free) it seems like it assumes “convert_decimal_separator” returns a float… But in this returned string (“Free”). To immeditately get rid of error, I added two lines… Suggest you check this out soon!

    $cost_with_period = $this->convert_decimal_separator( $cost );

    /* WE ADDED*/
    if(is_string($cost_with_period))
    return $cost_with_period;
    /* END WE ADDED*/

    if ( '0.00' === number_format( $cost_with_period, 2, '.', ',' ) ) {
    return esc_html__( 'Free', 'the-events-calendar' );
    }

    return $cost;
    }

    #1408107
    Patricia
    Member

    Hi there,

    Thank you for reaching out to us!

    Unfortunately, this is a known issue: I’m sorry to hear that you are being affected by this bug as well! The good news is that a fix is expected to be released this week: you will be contacted as soon as a solution is available.

    In the meantime you can either downgrade (https://theeventscalendar.com/knowledgebase/downgrading-plugin-past-version/) both The Events Calendar and Event Tickets (if you have both installed) and then wait for the fix or implement the temporary solution/fix provided here: https://theeventscalendar.com/support/forums/topic/just-updated-plugin-and-my-calendar-broke/#dl_post-1401697

    Thank you for your patience and understanding and if you have any other questions in the meantime, please let me know!

    Best Regards,

    Patricia

    #1409016
    Courtney
    Member

    Hey there

    We’ve just released an update that should fix this bug. You can read more about it at http://m.tri.be/19tp. Please update your plugins and let us know if you are still experiencing this or if we can close out this ticket.

    Note: We suggest testing updates on a staging server (https://theeventscalendar.com/knowledgebase/creating-using-wordpress-staging-site/).

    Thanks
    Courtney šŸ™‚

    #1422453
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Cost issue bug with latest version’ is closed to new replies.