Skip to content

Commit

Permalink
Adds taxes to variation prices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres A authored and Andres A committed Mar 20, 2023
1 parent 7343ab2 commit 0d49024
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/model/class-product-variation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ protected function init() {
},
'price' => function() {
return ! empty( $this->wc_data->get_price() )
? \wc_graphql_price( $this->wc_data->get_price() )
? \wc_graphql_price( \wc_get_price_to_display( $this->wc_data, [ 'price' => $this->wc_data->get_price() ] ) )
: null;
},
'regularPrice' => function() {
return ! empty( $this->wc_data->get_regular_price() ) ?
\wc_graphql_price( $this->wc_data->get_regular_price() )
return ! empty( $this->wc_data->get_regular_price() )
? \wc_graphql_price( \wc_get_price_to_display( $this->wc_data, [ 'price' => $this->wc_data->get_regular_price() ] ) )
: null;
},
'salePrice' => function() {
return ! empty( $this->wc_data->get_sale_price() )
? \wc_graphql_price( $this->wc_data->get_sale_price() )
? \wc_graphql_price( \wc_get_price_to_display( $this->wc_data, [ 'price' => $this->wc_data->get_sale_price() ] ) )
: null;
},
'dateOnSaleFrom' => function() {
Expand Down

0 comments on commit 0d49024

Please sign in to comment.