Skip to content

Commit 7343ab2

Browse files
creative-andrewAndres A
andauthored
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 <[email protected]>
1 parent 2b93c07 commit 7343ab2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/model/class-product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected function init() {
241241
: null;
242242
},
243243
'priceRaw' => function() {
244-
return ! empty( $this->wc_data->get_price() ) ? \wc_get_price_to_display( $this->wc_data ) : null;
244+
return ! empty( $this->wc_data->get_price() ) ? $this->wc_data->get_price() : null;
245245
},
246246
'regularPrice' => function() {
247247
return ! empty( $this->wc_data->get_regular_price() )
@@ -255,8 +255,8 @@ protected function init() {
255255
return ! empty( $this->wc_data->get_sale_price() )
256256
? \wc_graphql_price(
257257
\wc_get_price_to_display(
258+
$this->wc_data,
258259
[
259-
$this->wc_data,
260260
'price' => $this->wc_data->get_sale_price(),
261261
]
262262
)

0 commit comments

Comments
 (0)