wp-graphql / wp-graphql-woocommerce

Add WooCommerce support and functionality to your WPGraphQL server
https://woographql.com
GNU General Public License v3.0
643 stars 130 forks source link

fix: wrong taxonomy label case in product attributes #869

Closed creative-andrew closed 1 month ago

creative-andrew commented 3 months ago

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?

creative-andrew commented 1 month ago

@kidunot89 any love for this?

kidunot89 commented 1 month ago

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