Skip to content

Conversation

@berryhijwegen
Copy link
Contributor

@berryhijwegen berryhijwegen commented Jan 4, 2023

What does this implement/fix?
This PR implements a 'graphql_woocommerce_products_add_sort_fields' hook to add custom sort fields to products. Currently it is possible to add values using the 'Products_orderby_enum_values' hook, but because of the hardcoded switch that the current master branch has, all the custom added values are ignored.

Does this close any currently open issues?
#694

Where has this been tested?

  • WooGraphQL Version: 1.13.7
  • WPGraphQL Version: 0.12.0
  • WordPress Version: 6.1.1
  • WooCommerce Version: 7.2.2
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 4f3a928 and detected 15 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 15

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

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

View more on Code Climate.

@lstellway
Copy link
Contributor

I believe this is related:
#694

Copy link
Collaborator

@kidunot89 kidunot89 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for the hard work 👍🏿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

3 participants