Skip to content

Commit

Permalink
Fix wrong arg in sale place wc_get_price_to_display and remove wc_get…
Browse files Browse the repository at this point in the history
…_price_to_display from raw price. (#716)

Co-authored-by: Andres A <andres@Andress-MacBook-Pro.local>
  • Loading branch information
creative-andrew and Andres A authored Mar 17, 2023
1 parent 2b93c07 commit 7343ab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/model/class-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand All @@ -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(),
]
)
Expand Down

0 comments on commit 7343ab2

Please sign in to comment.