Home › Forums › Calendar Products › Events Calendar PRO › Cost issue bug with latest version
- This topic has 4 replies, 3 voices, and was last updated 8 years, 3 months ago by
social-ink.
-
AuthorPosts
-
December 15, 2017 at 10:00 am #1406560
social-ink
ParticipantAs 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;
}
December 18, 2017 at 11:50 am #1408107Patricia
MemberHi 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
December 19, 2017 at 11:30 am #1409016Courtney
MemberHey 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 šJanuary 10, 2018 at 8:37 am #1422453Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Cost issue bug with latest version’ is closed to new replies.
