original_price not saving decimal places in database
-
Hi there,
I am using this plugin to try to create wishlists for bookable products (using Woocommerce Bookings plugin).
I am having a bug when saving original_price (defined as decimal (9,3) ) to the yith_wcwl database in that if original product price is eg. 9.99, it will save it as 9.00. The price is obtained via the function get_product_price() which ultimately uses $product->get_price() which will fetch the data from post_meta database where it is stored as text. I have researched and tried several ways to convert string to decimal but no matter what I do, the decimal places are always gone when writting to yith_wcwl database. Any idea why this is happening?
- The topic ‘original_price not saving decimal places in database’ is closed to new replies.