25 Commits
Author SHA1 Message Date
Geoff TaylorandGitHub f0c7667aad fix: v1.0.1 bugfixes — session key, cart persistence, null attrs (#1012)
* fix: session secret key, cart session persistence, null variation attributes

- Use wp_salt() as fallback secret key instead of hardcoded 24-byte string
  to satisfy php-jwt v7's HS256 minimum key length requirement (Closes #1009)
- Call get_cart_from_session() after wc_load_cart() in
  initialize_session_and_cart() to prevent cart queries from clearing
  persisted session data (Closes #1010)
- Guard against null $attrs in variation_attributes_to_data_array()
  to prevent PHP warnings when variations have no attributes (Closes #1011)
- Return empty array instead of null for product attribute options
  when no terms exist

* chore: Linter compliances met
2026-04-01 13:17:30 -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
Geoff TaylorandGitHub 22b03e42b4 fix: "Product" interfaces shared fields fix (#901)
* fix: "Product" interface applied to all sub Product interfaces for more optimal schema shape

* fix: more inconsistencies fixed.

* feat: "ProductWithAttributes" interface radded to "ProductWithVariations" interface
2024-11-06 11:35:14 -05:00
d65c6a716d fix: wrong taxonomy label case in product attributes (#869)
* fix: wrong taxonomy label in product attributes

* fix: adjust test to remove ucwords

* fix: more unneeded string decoration removed

* devops: Unstable test assertion removed

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2024-08-06 20:40:46 -04:00
962410d265 fix: add model classes to type configs to better support query analyzer ID tracking (#874)
* - remove several fields that are already registered by core when the post type is mapped to the schema

* devops: Tests updated and coupon "salt" restored

* chore: Linter & PHPStan compliance met

* chore: Linter & PHPStan compliance met

* devops: "self" replaced with "static" in cli tests

* chore: fix cleanup after rebasing

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2024-08-06 18:54:18 -04:00
Dovid LevineandGitHub e96236696f chore: bump deps to meet actual requirements and lint for WPCS 3.0 (#816)
* chore: bump min versions to actual and update deps

* chore: fix multiple empty lines at EOF

* chore: preincrement when standalone (phpcs)

* fix: use `printf` instead of `echo sprintf` [phpcs]

* chore: avoid lonely `if()` in `else{}` [phpcs]

* chore: avoid reserved keywords as param names [phpcs]

* chore: remove unused callback params [phpcs]

* chore: remove more unused callback params [phpcs]

* chore: apply lints to tests

* chore: update ruleset for PHPCS 3.0

* texts: restore $last_request_headers
2023-11-30 08:41:32 -05:00
Geoffrey K TaylorandGitHub 87d7a7b1a9 fix: ProductVariation type made to inherit the Product interface. (#788)
* devops: WP theme during e2e locked to TwentyTwentyOne

* fix: "Product Connection Resolver" restored

* chore: Linter/PHPStan compliance met

* devops: CustomerProceedsToCheckoutCept updated.

* chore: Linter compliance met
2023-08-22 17:14:39 -04:00
Geoffrey K TaylorandGitHub e6be30ebcd fix: Several minor obscured syntax errors fix (#771)
* fix: Several minor obscured syntax errors fix

* fix: more fixes.

* fix: attribute "name" and "label" inconsistencies resolved.
2023-07-19 19:13:51 -04:00
Geoffrey K TaylorandGitHub 60711aaa1b feat: Account URL added to Auth URLs. (#755)
* feat: Account URL added to Auth URLs.

* fix: Account URL issues resolved + Variation Attribute connections refactored.
2023-07-03 03:34:58 -04:00
Geoffrey K TaylorandGitHub de8cad3a81 fix: Fixed all product connection filtering regressions (#704)
* fix: Fixed all product connection filtering regressions

* chore: WPCS compliance met

* fix: Unsupport syntax refactored
2023-02-02 16:47:19 -05:00
Geoffrey K TaylorandGitHub 9073793e86 chore: WPGraphQL v1.9.x connection resolver support added and autoloader removed. (#647)
* chore: WPGraphQL v1.9x + WP Bedrock support added.

* chore: lint compliance met.

* chore: composer/installers added back to allow-plugins
2022-08-26 14:53:36 -04:00
Geoffrey K TaylorandGitHub 6dbdcb5ae8 fix: Product Attribute naming conventions changed (#603)
* fix: Product Attribute naming conventions changed

* devops: dev dependencies updated

* devops: dev dependencies updated

* devops: dev dependencies updated

* devops: Dockerfile updated

* devops: dev dependencies updated

* devops: dev dependencies updated

* devops: dev dependencies updated

* devops: Dockerfile updated

* chore: Docker composer configurations updated

* chore: Coding standards met.
2022-02-04 15:00:44 -05:00
a7714d0cd2 Updates to be compatible with WPGraphQL v1.6.1 (#537)
* fix: Huge refactor across schema and unit tests

* - add shipping_method loader in class-core-schema-filters.php

* - Update class-wc-db-loader.php to respect the new SHIPPING_METHOD loader with a `load_shipping_method_from_id()` function

* - Convert Shipping_Method_Connection_Resolver to extend AbstractConnectionResolver

* - Replace resolver for Shipping Methods connection. Remove use of `resolveNode` and replace the resolver with the new connection class `get_connection()` call

* chore: Factory class refactored.

* - update the function that registers Product Types to the Schema to use the value from the `get_enabled_product_types()` as the Type name and the key as the fieldName

* chore: PaymentGatewayQueriesTest refactored.

* chore: WPCS compliance met

* chore: Syntax error fixed.

Co-authored-by: Jason Bahl <jasonbahl@mac.com>
2021-08-11 14:26:09 -04:00
Geoff TaylorandGeoff Taylor f47bee2b5f Docker/Codeception configuration heavily refactored.. 2021-01-22 11:34:09 -05:00
Geoff Taylor ee9b210a42 GlobalProductAttribute "label" field defined. 2020-08-06 14:47:24 -04:00
Geoff Taylor cf25353985 ProductAttributeQueriesTest updated 2020-08-06 14:47:24 -04:00
Geoff Taylor 369fb7aa22 testing updated. 2019-11-13 18:53:31 -05:00
Geoff Taylor 971f4eaf0f ""ProductUnion" type implemented. 2019-10-17 21:39:38 -04:00
Geoff Taylor 3c0bcd3cda Cacheable global ID add to ProductAttribute type. 2019-06-23 09:23:17 -04:00
Geoff Taylor 3cd2398a6a "_beforeSuite()" implemented in Wpunit class. 2019-05-09 23:11:00 -04:00
Geoff Taylor 79131d17e0 Undefined function call removed 2019-05-09 18:58:28 -04:00
Geoff Taylor 560d67097a bootstrap file added for testing 2019-05-09 18:50:20 -04:00
Geoff Taylor 7cf652a81d "WC_Product_Query" replaced with "WP_Query" for performance benefits. 2019-05-09 13:14:45 -04:00
Geoff Taylor b7e06be378 removed unnecessary code from "class-wp-graphql-woocommerce.php". Replaced "do_graphql_request()" with "graphql()" in "ProductAttributeQueriesTest.php". 2019-05-02 16:02:30 -04:00
Geoff Taylor 0cbfcea275 ProductAttributeTest implemented 2019-05-02 13:28:04 -04:00