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

fix: wrong taxonomy label case in product attributes #869

Merged

Conversation

creative-andrew
Copy link
Contributor

What does this implement/fix? Explain your changes.

Product attribute taxonomy labels are returned with all words in uppercase.
There is no need to call ucwords as the label is correctly saved on the database taxonomy object.

/var/www/html $ wp taxonomy get pa_schirmgroesse
Field         | Value                                                                                                                                                   
name          | pa_schirmgroesse                                                                                                                                        
label         | Produkt Schirmgröße in cm                                                                                                                              

Data returned by wp-graphql-woocommerce

image

with the fix applied:

image

Where has this been tested?

  • **WooGraphQL Version: 0.19.0
  • **WPGraphQL Version: 1.25.0
  • **WordPress Version: 6.5.3
  • **WooCommerce Version: 8.8.3

@creative-andrew creative-andrew changed the title fix: wrong taxonomy label in product attributes fix: wrong taxonomy label case in product attributes Jun 18, 2024
@creative-andrew
Copy link
Contributor Author

@kidunot89 any love for this?

@kidunot89
Copy link
Member

Prepping it for the next release. Just need to finish some other stuff first.

Copy link
Member

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

@creative-andrew Removed all the string decoration in relation to the attribute label. It makes it a bigger breaking change but it resolves our consistency issues 100%. Also added a unit test compare the options and labels of a variable products attributes with it's variations attribute counterpart.

@kidunot89 kidunot89 merged commit d65c6a7 into wp-graphql:develop Aug 7, 2024
15 checks passed
@kidunot89 kidunot89 added breaking change Solution will break some older solutions bugfix Implements bugfix labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Solution will break some older solutions bugfix Implements bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants