Skip to content

Commit

Permalink
Adds taxes to variation prices. (#717)
Browse files Browse the repository at this point in the history
Co-authored-by: Andres A <andres@Andress-MacBook-Pro.local>
  • Loading branch information
creative-andrew and Andres A authored Mar 21, 2023
1 parent 7343ab2 commit 6532e0a
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 6532e0a

Please sign in to comment.