3 Commits
Author SHA1 Message Date
974393aeeb fix: Sanitize ProductAttribute name to match VariationAttribute [#965] (#966)
* fix: Sanitize ProductAttribute name to match VariationAttribute [#965]

* devops: add unit test for attribute name consistency between product and variation (#965)

* devops: fix phpcov merge by using .cov extension and pinning phpcov to v8

* chore: Lintercompliances met

* fix: update test expectation for sanitized local attribute name

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2026-03-26 20:10:08 -04:00
Geoff TaylorandGitHub b0a798e738 devops: add attribute term products categoryId filter regression test (#987)
Adds test confirming that categoryId filtering works on the products
connection from attribute term types (e.g. allPaSeller.products).
The issue was reported on v0.12.1 and is not reproducible on the
current codebase.
2026-03-23 22:55:48 -04:00
Geoff TaylorandGitHub 8f4d3c3709 feat: productAttributes query implemented (#905)
* refactor: Product_Attribute_Connection_Resolver class refactor to be more consistent with contemporaries

* refactor: Product_Attribute_Connection_Resolver class refactoring continued

* feat: implement productAttributes root query, products connection on ProductAttribute, and category-scoped attributes

- Implement build_nodes_from_global_attributes() to return WC_Product_Attribute
  objects from wc_get_attribute_taxonomies()
- Fix build_connection() infinite recursion and undefined variable bugs
- Add products connection from ProductAttribute interface to Product via
  tax_query (global) or meta_query (local) in class-products.php
- Add productAttributes connection from ProductCategory to GlobalProductAttribute
  in class-product-attributes.php
- Move localAttributes/globalAttributes connections from class-product-attributes.php
  to ProductWithAttributes interface get_connections()
- Fix ProductAttribute id resolvers to use Relay::toGlobalId() instead of
  dynamically set _relay_id
- Remove deprecated get_items() method and GLOBAL_ID_DELIMITER constant
- Add ProductAttributeConnectionsTest with 4 tests covering root query,
  global/local attribute products connections, and category-scoped attributes
- Update ProductAttributeQueriesTest expectations for new id format and
  taxonomy-prefixed attribute names
2026-03-23 14:55:56 -04:00