From 7343ab2174eac2ebb0ca971bad2f3f2d3bbfff8a Mon Sep 17 00:00:00 2001 From: Andres Date: Fri, 17 Mar 2023 19:52:15 +0100 Subject: [PATCH] Fix wrong arg in sale place wc_get_price_to_display and remove wc_get_price_to_display from raw price. (#716) Co-authored-by: Andres A --- includes/model/class-product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/model/class-product.php b/includes/model/class-product.php index fe65ff62e..1078e9395 100644 --- a/includes/model/class-product.php +++ b/includes/model/class-product.php @@ -241,7 +241,7 @@ protected function init() { : null; }, 'priceRaw' => function() { - return ! empty( $this->wc_data->get_price() ) ? \wc_get_price_to_display( $this->wc_data ) : null; + return ! empty( $this->wc_data->get_price() ) ? $this->wc_data->get_price() : null; }, 'regularPrice' => function() { return ! empty( $this->wc_data->get_regular_price() ) @@ -255,8 +255,8 @@ protected function init() { return ! empty( $this->wc_data->get_sale_price() ) ? \wc_graphql_price( \wc_get_price_to_display( + $this->wc_data, [ - $this->wc_data, 'price' => $this->wc_data->get_sale_price(), ] )