20 Commits
Author SHA1 Message Date
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 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
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
Geoff TaylorandGitHub f686e743b0 feat: Queries and mutations for shipping zones, tax classes, and tax rates. (#856)
* fix: General bugfixes and improvements

* devops: New mutations and types tested and compliance with Linter and PHPStan

* chore: hooks added to the mutation resolvers

* feat: permission checks added

* chore: Linter and compliance met

* chore: Linter and compliance met
2024-05-17 00:03:10 -04:00
Geoff TaylorandGitHub f1d96bead4 collectionStats query fully implemented (#849)
* fix: WPGraphQL v1.24.x support added

* fix: WPGraphQL v1.24.x support added

* chore: Linter and PHPStan compliance met

* chore: composer.json fixed

* fix: Unnecessary type check restored

* chore: Linter and PHPStan compliance met

* devops: CollectionStatsQueryTest patched
2024-05-16 21:27:54 -04:00
Geoffrey K TaylorandGitHub 27d9297494 feat: payment method mutations and fields implemented. (#735)
* feat: payment method mutation implemented.

* devops: Unit test updated.

* chore: WPCS compliance met.
2023-04-20 17:33:58 -04: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 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 86c7fb8b4e Refund connections refactored. 2021-06-04 00:12:35 -04:00
Geoff Taylor 8215901e93 Order connections refactored. 2021-06-03 21:37:09 -04:00
Geoff Taylor a37e22480b Order Connection logic/tests heavily refactored. 2021-05-30 14:59:45 -04:00
Geoff Taylor da2cbdf484 "Coupon_Connection_Resolver" deprecated. 2021-05-19 19:45:02 -04:00
Geoff Taylor db095015b1 Version numbers and Repo templates updated. 2021-02-26 21:12:52 -05:00
Geoff Taylor a51cb59fa3 Cart* test refactored heavily to extend the WPGraphQLTestCase 2021-02-26 10:53:31 -05:00
Geoff Taylor 993df4b175 "Cart" and "ProductVariation" factories implemented. 2021-02-26 10:25:34 -05:00
Geoff TaylorandGeoff Taylor 56b9f7ddca WPGraphQLTestCase class replaced with same class from "wp-graphql/wp-graphql-testcase" package 2021-02-26 10:24:08 -05:00
Geoff TaylorandGeoff Taylor 34a925a442 "ProductQueriesTest" test refactored to extend the "WooGraphQLTestCase" class 2021-02-26 10:10:23 -05:00