* devops: WC email template tests, COT cursor HPOS fix, checkout account auth
WC Email Template Tests:
- Add WooCommerceEmailTemplatesTest verifying WC email templates are used
for registerCustomer, checkout with account creation, and password reset
- Use MockPHPMailer to capture emails and verify HTML content type
- Disable deferred transactional emails during tests via GRAPHQL_TESTING flag
COT Cursor HPOS Fix:
- Fix COT_Cursor::compare_with to resolve orderby aliases and legacy meta
keys (_order_total, _date_completed, etc.) to COT column names
- Add resolve_orderby_alias() mapping short aliases and meta keys to columns
- Add DB_Hooks::clean_query_vars to translate post_* and meta_key orderby
to COT-compatible equivalents via woocommerce_order_query_args filter
Checkout Account Authentication:
- Add authenticate field to CreateAccountInput type
- Gate wc_set_customer_auth_cookie() behind authenticate flag in checkout
mutation so account creation doesn't auto-authenticate by default
Closes#882
* devops: codeception.dist.yml updated
* fix: Functional test cleanup and CI coverage condition
Test fixes:
- Enable authorizing URL fields in ProtectedRouterCest and
DownloadableItemAuthCest via setWooGraphQLSetting
- Add stale data cleanup (sessions, users, products, orders) to
GraphQLE2E _setupStore/getCatalog/setupStoreAndUsers
- Fix CartTransactionQueueCest and CartQueriesTest for test isolation
CI:
- Only run coverage job when at least one upstream job succeeds
* chore: Linter compliances met
* fix: HPOS order mutation data loss and CI coverage condition
Refactor order create/update mutations to set all props on a single
WC_Order instance before saving, mirroring the WC REST API pattern.
Previously, separate add_order_meta() and add_items() calls each loaded
their own order instance and saved independently, causing HPOS data loss
for payment method, addresses, and other fields.
Also fix CI coverage job to only run when all upstream jobs succeed,
and correct test assertions for RAW format line item totals.
Closes#591
* chore: Linter compliances met
* chore: Remove dead code from Order_Mutation after prepare_order refactor
Removes add_items() and update_address() which are no longer called
after the prepare_order() consolidation.
* chore: Remove dead code add_order_meta and update_item_meta_data
* feat: WC Settings API, compatibility refactor, HPOS fix, CI improvements
WC Settings GraphQL API:
- Add WCSetting interface with common fields and type-safe resolveType
- Add concrete types: WCStringSetting, WCArraySetting, WCRelativeDateSetting,
WCImageWidthSetting with typed value/default fields
- Add WCSettingGroup type with nested settings field
- Add wcSettingGroups and wcSettings root query fields (admin only)
- Add updateWCSetting and updateWCSettings mutations
- Dynamic WCSettingTypeEnum collected from registered WC settings
- Filters: graphql_woocommerce_setting_type_map, graphql_woocommerce_setting_types
- Register WC admin settings for GraphQL requests via Compatibility class
Compatibility refactor:
- Consolidate ACF, JWT Auth, and QL Search filters into Compatibility class
- Remove class-acf-schema-filters.php, class-jwt-auth-schema-filters.php, functions.php
HPOS compatibility fix:
- Replace hardcoded directory name check with dirname(__DIR__) === WP_PLUGIN_DIR
- Works with any plugin folder name while still skipping nested vendor installs
CI improvements:
- Remove STRIPE_API_PUBLISHABLE_KEY restriction from coverage job
- Add HPOS to coverage matrix entries
- Sort type registry and includes alphabetically
Other fixes:
- Fix Settings_Mutation::validate_setting_checkbox_field to be static
- Update ShippingZone settings field type to WCStringSetting
Closes#864, closes#969
* refactor: Rename and split core classes, add order cursor pagination tests
Class renames:
- WooCommerce_Filters → WooCommerce (class-woocommerce.php), setup() → init()
- Core_Schema_Filters → Post_Types (class-post-types.php)
Class split:
- Extract taxonomy registration from Core_Schema_Filters into Taxonomies (class-taxonomies.php)
Access functions:
- Add wc_graphql_resolve_product_type() for interface resolveType callbacks
- Add wc_graphql_is_session_handler_disabled()
- Add wc_graphql_enabled_authorizing_url_fields()
- Add wc_graphql_get_authorizing_url_nonce_param_name()
- Replace direct class references with global functions in type-registry,
compatibility, protected-router, and all product interface files
Stripe gateway compatibility:
- Move woographql_stripe_gateway_args from WooCommerce to Compatibility class
- Rename to woocommerce_gateway_stripe_args
Tests:
- Add OrderCursorPaginationTest (6 tests) covering COT cursor-based
pagination: forward/backward, date ordering ASC/DESC, cursor integrity
* fix: Use proper expectedField/expectedNode assertions in cursor pagination tests
Replace empty assertQuerySuccessful([]) calls and manual lodashGet
assertions with expectedField, expectedNode, and not()->expectedNode()
for proper GraphQL response validation.
* 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
* feat: Add Store API Cart-Token compatibility and session handler improvements
* chore: Linter compliances met
* chore: linter compliances met
* chore: linter compliances met
* feat: QL Session Handler functionality expanded to support cookies on non-GraphQL requests
* chore: Linter and PHPStan compliance met
* devops: QLSessionHandlerTest patched for suite testing
* chore: Linter and PHPStan compliance met
* fix: More cart session save triggered implemented
* fix: More cart session save triggered implemented
* chore: Linter compliance met
* chore: Linter compliance met
* feat: forgetSession mutation added
* feat: forgetSession mutation added
* - 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>