Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds taxes to product variation prices. #717

Conversation

creative-andrew
Copy link
Contributor

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Make sure you are requesting to pull request from a topic/feature/bugfix/devops branch (right side). Don't pull request from your master!
  • Have you ensured/updated that CLI tests to extend coverage to any new logic. Learn how to modify the tests here.

What does this implement/fix? Explain your changes.

Continuing with the work done in 703 and 713, this PR adds tax calculation to the prices shown in the product variations.

@creative-andrew creative-andrew changed the title Adds taxes to variation prices. Adds taxes to product variation prices. Mar 20, 2023
: 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() )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid too many return statements within this method.

@codeclimate
Copy link

codeclimate bot commented Mar 20, 2023

Code Climate has analyzed commit 0d49024 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

The test coverage on the diff in this pull request is 75.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 82.0% (0.0% change).

View more on Code Climate.

@kidunot89 kidunot89 merged commit 6532e0a into wp-graphql:develop Mar 21, 2023
@kidunot89 kidunot89 added the bugfix Implements bugfix label Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Implements bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants