Skip to content

Commit d1ea595

Browse files
netzstrategencreative-andrew
authored andcommitted
fix: wrong taxonomy label case in product attributes
1 parent 1664427 commit d1ea595

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From d4deef3b1d53acd80d5e5c587412aba1fe4e9edc Mon Sep 17 00:00:00 2001
2+
From: creative-andrew <[email protected]>
3+
Date: Tue, 18 Jun 2024 14:55:44 +0200
4+
Subject: [PATCH] fix: wrong taxonomy label case in product attributes
5+
6+
---
7+
includes/type/object/class-product-attribute-types.php | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/includes/type/object/class-product-attribute-types.php b/includes/type/object/class-product-attribute-types.php
11+
index ac792001ec..0bc146cf4a 100644
12+
--- a/includes/type/object/class-product-attribute-types.php
13+
+++ b/includes/type/object/class-product-attribute-types.php
14+
@@ -71,7 +71,7 @@ class Product_Attribute_Types {
15+
'description' => __( 'Attribute label', 'wp-graphql-woocommerce' ),
16+
'resolve' => static function ( $attribute ) {
17+
$taxonomy = get_taxonomy( $attribute->get_name() );
18+
- return $taxonomy ? ucwords( $taxonomy->labels->singular_name ) : null;
19+
+ return $taxonomy ? $taxonomy->labels->singular_name : null;
20+
},
21+
],
22+
'name' => [
23+
--
24+
2.24.4
25+

0 commit comments

Comments
 (0)