79 Commits
Author SHA1 Message Date
Geoff TaylorandGitHub 9ef79563ac fix: Elementor breaks transfer-session endpoint (#1004)
* fix: Elementor breaks transfer-session endpoint with 500 error

Elementor's LandingPages module creates a WP_Query during `init` which
fires `pre_get_posts` before WooCommerce session is initialized. Our
resolve_request handler ran on this early query and called
WC()->session->get_customer_id() on null, causing a fatal error.

Fix: Guard resolve_request to only run on the main front-end query and
bail if WC session is not yet initialized. Also add Elementor to the
test environment and add functional tests that reproduce the issue.

Closes #945

* chore: Add @param docblock for resolve_request $query parameter

* devops: Remove unused resolvers and add session transaction manager tests

Remove Coupon_Connection_Resolver and Customer_Connection_Resolver
which had 0% coverage and were never instantiated.

Add SessionTransactionManagerTest covering did_transaction_expire
edge cases and next_transaction invalid/expired queue handling.
2026-03-30 22:58:32 -04:00
Geoff TaylorandGitHub 1807b2e798 Add authenticated download URLs for headless frontends (#995)
* feat: add authenticated download URLs for headless frontends

- Add downloadNonce and downloadUrl fields to DownloadableItem type
  using the existing Protected Router session transfer pattern
- Add preAuthDownloadUrl field (toggleable via settings) that generates
  tokenized download URLs for direct file access without cookie auth
- Add download_url nonce handling to Protected_Router
- Add enable_pre_auth_download_urls and download_url_nonce_param settings
- Add GraphQLE2E helpers for checkout and account shortcode pages
- Rewrite ProtectedRouterCest to test redirect flow without JS-dependent
  page content assertions, add account and payment method URL tests
- Add DownloadableItemAuthCest with 5 e2e tests covering both options

* fix: test suite stability and code coverage collection

- Add WC_Unit_Tests_Bootstrap stub to wpunit bootstrap to bypass
  wc_get_product_visibility_term_ids static cache between suites
- Add setWooGraphQLSetting helper to GraphQLE2E for safe individual
  field updates to woographql_settings option with proper defaults
- Update all functional tests to use setWooGraphQLSetting instead of
  replacing the entire woographql_settings option
- Fix createRelated factory to use explicit shared category instead
  of relying on default Uncategorized category
- Add download_url to ProtectedRouterTest nonce names assertion
- Remove debug logs from ProductQueriesTest and ProductsQueriesTest
- Fix CI workflow to run suites separately and aggregate coverage
  via phpcov merge
- Wire c3.php into WordPress index.php for remote coverage collection
- Update .coveralls.yml service_name to github-actions
- Clean up Xdebug 2 settings in Dockerfile

* chore: Linter compliances met

* fix: ensure tests/_output is writable for c3.php coverage collection

* devops: .env.docker removed from setup

* devops: split CI into separate jobs per suite with retry and coverage aggregation

* devops: add +Coverage indicator to CI job names

* devops: add --fail-fast to first run, fix retry to mark job as passing on retry success
2026-03-26 17:20:55 -04:00
Geoff TaylorandGitHub b62193e6d4 devops: add hCaptcha session token regression test (#979)
* test: add hCaptcha session token regression test

Adds functional test verifying the session token is correctly linked
to the authenticated user after login when hCaptcha for WP is active.

Resolves #941
Resolves #942

* devops: login test added
2026-03-20 20:21:42 -04:00
Geoff TaylorandGitHub 005f361fb8 fix: inverted logic in pop_transaction_id() causes cart session corruption (#971)
* fix: resolve REQUEST_URI fatal error and JWT key length issues in CI

QLSessionHandlerTest::tearDown() was calling unset($_SERVER) which
destroyed the entire superglobal. WordPress cron.php then fataled on
shutdown when accessing $_SERVER['REQUEST_URI']. Changed to only unset
the specific HTTP_WOOCOMMERCE_SESSION key.

Also updated JWT secret keys to meet firebase/php-jwt v7's minimum
32-byte requirement for HS256 in both test config and Docker entrypoint.

* fix: the rest of the files added

* devops: php7.4 removed from matrix

* chore: Linter compliances met

* devops: More broken test updated

* devops: Tests updated for CI

* fix: QLSessionHandlerCest fixed

* fix: QLSessionHandlerCest fixed

* devops: CI fixed
2026-03-17 23:49:48 -04:00
Geoff TaylorandGitHub ef53404fc3 fix: product variation duplicate fields removed (#957)
* fix: product variation duplicate fields removed

* chore: Linter compliances met

* chore: Linter compliances met

* chore: Linter compliances met

* chore: Linter compliances met

* chore: Linter compliances met

* chore: Linter compliances met

* devops: CI compliances met

* devops: unneeded access function removed

* devops: unneeded access function removed

* devops: unneeded access function removed
2026-01-16 12:28:23 -05:00
Geoff TaylorandGitHub bde70cb72e feat: Add Store API Cart-Token compatibility and session handler improvements (#954)
* feat: Add Store API Cart-Token compatibility and session handler improvements

* chore: Linter compliances met

* chore: linter compliances met

* chore: linter compliances met
2025-11-15 19:02:41 -05:00
Geoff TaylorandGitHub f61b55f8df fix: Add direct or/and syntax support to ProductTaxonomyInput and fix test issues (#948)
* fix: Add direct or/and syntax support to ProductTaxonomyInput and fix test issues

* fix: Add OrderNote visibility filters for queries and mutations
2025-10-11 16:29:36 -04:00
Geoff TaylorandGitHub 3baeb2bafa fix: "menu_order" pagination fixed (#922)
* fix: "menu_order" pagination fixed

* devops: More unit tests added for product pagination
2025-02-27 10:21:48 -05:00
Geoff TaylorandGitHub aff04371a7 fix: "key" argument for MetaData fields fixed (#921) 2025-02-27 10:21:27 -05:00
Geoff TaylorandGitHub 8fc7986e4d devops: composer-git-hooks added. CONTRIBUTING.md updated. (#904) 2024-11-06 11:34:09 -05:00
Geoff TaylorandGitHub 2543f33475 fix: Bug in Session_Transaction_Manager::pop_transaction_id() fixed (#852)
* fix: bug in Session_Transaction_Manager::pop_transaction_id fixed

* chore: Linter and PHPStan compliance met

* devops: tests updated

* devops: WPBrowser upgraded to v4.x.x

* devops: Some unit testing configurations updated

* devops: WPBrowser updated and tests passing

* chore: PHPStan and linter compliance met

* devops: WP_CORE_DIR fixed

* devops: More docker config changes

* devops: CartMutationsTest updated

* devops: CI env vars fixed

* devops: More CI fixes

* devops: More CI fixes

* devops: More CI fixes

* devop: Docker env removed

* devops: Codeception configs updated

* devops: configurations tweaked heavily
2024-05-21 00:48:16 -04:00
Geoff TaylorandGitHub 8ba35cd50f Fix: WPGraphQL v1.24.x support implemented (#850)
* fix: WPGraphQL v1.24.x support added + WC 3.6 support

* chore: Linter and PHPStan compliance met

* devops: CI config updated

* devops: docker config updated.

* devops: Docker configs updated.
2024-05-07 16:50:42 -04:00
Geoff TaylorandGitHub 753a0fac5d fix: Bug fixed in Product_Connection_Resolver::add_tax_query (#820)
* fix: Bug fixed in Product_Connection_Resolver::add_tax_query

* fix: some product connection resolver hooks restored
2023-12-22 18:06:12 -05:00
Geoffrey K TaylorandGitHub 3cf05bd195 fix: JWT Auth hooks now support WPGraphQL Headless Login (#812)
* fix: JWT Auth hooks now support WPGraphQL Headless Login

* chore: PHPStan compliance met

* fix: Proper TokenManager function in use for auth token resolution
2023-10-16 18:55:16 -04:00
Geoffrey K TaylorandGitHub 277cef0be2 fix: Cart_Mutation:prepare_attributes made public (#796)
* fix: Cart_Mutation:prepare_attributes made public

* devops: Dockerfile updated.
2023-09-11 17:19:31 -04:00
Geoffrey K TaylorandGitHub 44c27174b6 fix: WP User core field support fixed in updateCustomer mutation (#789)
* devops: CustomerMutationsTest refactored heavily

* fix: `updateCustomer` mutation patched
2023-08-22 20:18:47 -04: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 e684a51004 "vendor/woographql" -> "vendor-prefixed" (#777) 2023-08-03 17:02:54 -04:00
8690ede673 dev!: namespace Composer dependencies with strauss (#762)
* dev!: namespace Composer dependencies with strauss

* chore: include vendor-prefixed when stanning

* Strauss configurations properly applied. Contribution docs restored.

* Linter and PHPStan compliance met

* `platform` removed from `composer.json`

* devops: PHP7.3 removed from CI matrix

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2023-08-02 16:54:46 -04:00
57800b46f3 feat: HPOS support added. (#748)
* feat: HPOS support added.

* fix: Refund connections and connection permission fixed

* chore: Linter compliance met.

* devops: CI script updated.

* devops: CI script updated.

* fix: Syntax error fixed.

* devops: CI script updated.

* devops: CI script updated.

* devops: CI script updated.

* chore: PHPStan fixes started.

* chore: linter compliance met.

* chore: fix scanning and type-hinting for non-stubbed classes

* dev: refactor Order model around WC_Abstract_Order

* chore: update dev deps

* devops: PHPStan and Linter compliance met.

* devops: HPOS test temporarily suppressed.

---------

Co-authored-by: David Levine <david@axepress.dev>
2023-06-21 13:21:29 -04:00
4ef46acd15 chore: setup PHPStan (#746)
* chore: setup PHPStan

* chore: General code cleanup for PHPStan

* chore: PHPStan to level 2

* chore: PHPStan to level 2

* fix: Syntax error fixed.

* devops: PHPStan level 2 reached.

* devops: PHPStan level 3 passed

* devops: PHPStan level 4 passed

* chore: fix bad typehints from jwt-auth [phpstan]

* chore: simplify conditional logic in WC_Terms::register_connections()

* chore: add stubs for WP type properties.

* fix: check for valid WC_Order_Item before caching order.

* chore: lint

* devops: PHPStan level 6 passed.

* chore: Linter compliance met.

* chore: simplify logic and check for valid term.

* fix: ensure valid types (partial)

* chore: [phpcs] allow inline type annotations

* devops: PHPStan level 8 reached.

* devops: More stability fixes.

* fix: general bugfixes and improvements

* devops: Code Quality GA script added.

* devops: Linter compliance met & 2 "phpstan-ignore" statements set.

* devops: PHPStan config and CI script fixed.

* fix: "cartItem" query resolution refactored

* devops: GA scripts updated.

* chore: Simple copy changes

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2023-06-13 16:17:02 -04:00
Geoffrey K TaylorandGitHub f4b153f147 feat: Docs Restored. Unsupported product type setting implemented. (#731)
* feat: docs started. Unsupported product type implemented.

* chore: WPCS compliance met

* chore: file renamed.

* feat: More docs written

* feat: 2 more docs written

* fix: settings docs images added.

* fix: settings docs images added.

* devops: UnsupportProductTypeTest added.

* devops: More docs changes.

* chore: WPCS compliance met

* devops: UnsupportedProductTypeTest updated.

* chore: WPCS compliance met
2023-04-18 23:48:08 -04:00
Geoffrey K TaylorandGitHub 121918ffe2 devops: Test Scripts updated. (#702)
* devops: Test Scripts updated.

* chore: WPCS compliance met.
2023-02-01 14:57:46 -05:00
Geoffrey K TaylorandGitHub c083fa51a4 fix: Parent connection classes namespaces updated. (#696) 2023-01-24 17:21:16 -05:00
0b8ce4f634 fix: Connections need to connect to Types that implement the Node interface (#675)
* - implement Node on different Types

* - update class-customers to return arrays for edges and nodes
- move id resolver from product-attribute interface to the specific types

* - return empty arrays for edges/nodes for coupon connections
- update test to check for falsy vs null

* - remove manual registration of the `Product` Interface
- register the fields to the Product Interface

* - fix code style

* - fix code style

* - no longer pass type registry to Product::register_interface()

* -  use post type registry to register the Product type as an Interface

* WPGraphQL v1.13.x support added.

* WPGraphQL v1.13.x support added.

* fix: filter corrected.

* fix: Needed code restored

* fix: Needed code restored

* parent field no longer overwritten

* chore: WPCS compliance met.

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
2022-12-07 17:04:39 -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 b073dce134 chore: PHP-JWT upgraded to v6.1.0 (#633)
* chore: PHP-JWT upgraded to v6.1.0, Unit tests updated to work with WPGraphQL Testcase v2.3

* chore: PHP7.2 removed from testing workflow matrix.
2022-06-24 17:42:05 -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
Geoffrey K TaylorandGitHub cb970f36ed CartItem Product edge field "simpleAttributes" implemented and tested. (#521) 2021-07-05 18:18:52 -04:00
Geoff Taylor 8b0fc88acf php-coveralls configs updated. 2021-07-05 16:32:28 -04:00
Geoffrey K TaylorandGitHub 9bbb81ee36 Support for custom order statuses. (#518)
* Support for custom order statuses.

* package workflow updated.
2021-07-05 15:31:17 -04:00
Geoffrey K TaylorandGitHub f59872ae89 Coupon mutations added. (#510)
* Coupon mutations implemented and tested
* Vendor files no longer versioned and package workflow implemented
2021-07-05 13:51:52 -04:00
Geoff Taylor 1e809bbf20 ci workflow updated. 2021-01-27 00:27:47 -05:00
Geoff Taylor 71d0f4454b Remote tests removed from codecoverage. 2021-01-22 11:37:18 -05:00
Geoff Taylor b8d913ee8d Docker/Codeception CI configuration updated. 2021-01-22 11:36:50 -05:00
Geoff Taylor f55db50374 ProductHelper::create_download() bug resolved. 2021-01-22 11:36:50 -05:00
Geoff TaylorandGeoff Taylor f47bee2b5f Docker/Codeception configuration heavily refactored.. 2021-01-22 11:34:09 -05:00
Geoff Taylor 673ce74547 Docker testing entrypoint script refactored to work better with old versions of PHP. 2020-10-15 00:55:33 -04:00
Geoff Taylor b7a14f95a1 Session Handler upgraded. 2020-10-01 01:45:26 -04:00
Geoff TaylorandGeoff Taylor f9191c728b product attibute label fields added 2020-08-06 14:47:24 -04:00
Geoff Taylor 6ac72bc697 tests updated. 2020-05-11 21:26:36 -04:00
Geoff Taylor a4f2769d74 Docker script implemented 2020-05-11 21:26:14 -04:00
Geoff Taylor eb10eadd3b entrypoint script rebuilt 2020-05-11 21:25:55 -04:00
Geoff TaylorandGeoff Taylor 7fa4603a9b new test added. 2020-05-11 21:24:34 -04:00
Geoff TaylorandGeoff Taylor 8bee58a6db Docker CI configurations updated. 2020-05-11 21:23:14 -04:00
Geoffrey K Taylor 85a935d7cb Update README.md 2020-05-11 21:22:28 -04:00
Geoff TaylorandGeoff Taylor 6551ebc7e0 wc-db-loader created 2020-05-11 21:22:28 -04:00
Geoff Taylor b57ec1c34a "DownloadableItem" type and connection implemented. 2020-01-22 03:07:39 -05:00
Geoff Taylor ecbb74c5ba Docker configuration updated 2019-12-09 08:33:25 -05:00