Skip to content

fix: warnings in fillCart with empty coupons/shippingMethods - #613

Merged
kidunot89 merged 2 commits into
wp-graphql:developfrom
khlieng:fix-fillcart-warnings
Mar 15, 2022
Merged

kidunot89 merged 2 commits into
wp-graphql:developfrom
khlieng:fix-fillcart-warnings

Conversation

@khlieng

@khlieng khlieng commented Mar 9, 2022

Copy link
Copy Markdown
Contributor

Your checklist for this pull request

Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.

🚨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.

PHP warnings in the fillCart mutation when coupons or shippingMethods is empty.

Does this close any currently open issues?

…

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

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?

…

Where has this been tested?

  • WooGraphQL Version: 0.10.7
  • WPGraphQL Version: 1.7.2
  • WordPress Version: 5.9.1
  • WooCommerce Version: 6.2.1

Comment on lines 197 to +198
$applied = array();
$invalid_coupons = array();

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.

Comment on lines 227 to +228
$chosen_shipping_methods = array();
$invalid_shipping_methods = array();

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.

@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.

@khlieng Good catch 👍🏿, thanks for work 🙏🏿

@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit 7fcf24c 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 100.0% (50% is the threshold).

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

View more on Code Climate.

@kidunot89
kidunot89 merged commit 118d183 into wp-graphql:develop Mar 15, 2022
@kidunot89 kidunot89 added the bugfix Implements bugfix label Mar 15, 2022
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