From 4725bb3e725893a26676777364220dbd3ba57d87 Mon Sep 17 00:00:00 2001 From: Edi Amin Date: Wed, 12 Sep 2018 20:31:46 +0600 Subject: [PATCH] Ignore converting float meta value for registered post meta --- includes/class-wc-post-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-post-data.php b/includes/class-wc-post-data.php index 36085196caa..e641088de5e 100644 --- a/includes/class-wc-post-data.php +++ b/includes/class-wc-post-data.php @@ -245,7 +245,7 @@ class WC_Post_Data { wp_cache_delete( 'product-' . $object_id, 'products' ); } - if ( ! empty( $meta_value ) && is_float( $meta_value ) && in_array( get_post_type( $object_id ), array_merge( wc_get_order_types(), array( 'shop_coupon', 'product', 'product_variation' ) ), true ) ) { + if ( ! empty( $meta_value ) && is_float( $meta_value ) && ! registered_meta_key_exists( 'post', $meta_key ) && in_array( get_post_type( $object_id ), array_merge( wc_get_order_types(), array( 'shop_coupon', 'product', 'product_variation' ) ), true ) ) { // Convert float to string. $meta_value = wc_float_to_string( $meta_value );