Skip to content

Fix raw pricing returning null - #544

Merged
kidunot89 merged 1 commit into
wp-graphql:developfrom
dpacmittal:develop
Sep 8, 2021
Merged

kidunot89 merged 1 commit into
wp-graphql:developfrom
dpacmittal:develop

Conversation

@dpacmittal

@dpacmittal dpacmittal commented Sep 3, 2021 •

Copy link
Copy Markdown
Contributor

$prices['price'] doesn't exist as $prices variable has already been overwritten inside the switch case. This causes pricing to return null for all pricing fields (regular, sale, price) which are formatted as RAW.

What does this implement/fix? Explain your changes.

Fixes raw pricing for variable products returning null.

Does this close any currently open issues?

Fixes #479

Any relevant logs, error output, GraphiQL screenshots, etc?

None

Any other comments?

None

$prices['price'] doesn't exist as $prices variable has already been overwritten inside the switch case. This causes pricing to return null for all pricing fields (regular, sale, price) which are formatted as RAW.
@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit b1d23e3 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 2

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

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

View more on Code Climate.

@kidunot89 kidunot89 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dpacmittal Thanks for the work on this 🙏🏿

@kidunot89
kidunot89 merged commit b0fb2a2 into wp-graphql:develop Sep 8, 2021
@kidunot89 kidunot89 added the bugfix Implements bugfix label Sep 8, 2021
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.

price(format: RAW) returns null for VariableProduct

2 participants