* fix: address WordPress.org plugin review feedback
- Prefix the session transaction queue transient with the plugin's
graphql_woocommerce_ namespace instead of the generic "woo_" word, to
avoid collisions (Plugin Directory: prefix data storage).
- Declare the WooCommerce dependency via the "Requires Plugins: woocommerce"
plugin header.
- Bump README.txt "Tested up to" to 7.0.
- Ship composer.json in the distributed plugin (drop it, and composer.lock,
from composer archive excludes) so the build is reproducible/reviewable.
* chore: rename plugin to "GraphQL for eCommerce" for trademark compliance
The WordPress.org plugin review flagged the display name/slug for beginning
with the "WPGraphQL" trademark (and the "WooGraphQL" portmanteau of the
WooCommerce mark), which can imply official affiliation.
- Display name (plugin header + readme title) -> "GraphQL for eCommerce".
- Slug/text domain -> "graphql-for-ecommerce" (header, all i18n string
literals, and the PHPCS WordPress.WP.I18n text_domain config).
- Update user-facing notices/errors that named the old plugin.
"WooGraphQL" remains the project's informal nickname (repo, docs, community),
just not in the WordPress.org directory's official name/slug. Internal file
names and GitHub URLs are unchanged.
* fix: keep test-only dev deps out of the committed composer.json
The committed manifest mirrors develop (lint/stan dev deps only); CI adds the
test suite deps at runtime via `composer installTestEnv`. A previous commit
captured the installTestEnv-modified composer.json, desyncing it from
composer.lock and breaking `composer install` in CI.
* chore: regenerate composer.lock (refresh dev dependencies)
Regenerate the lock from the manifest so it is in sync (fixes the CI
`composer install` failure) and refresh dependencies in the process —
firebase/php-jwt v7.0.4 -> v7.1.0 plus 11 others, with vendor-prefixed
re-strauss'd to match. Full wpunit suite passes against the updated deps
(305 tests, 835 assertions).
* chore: rename text domain in createdVia/attribution strings from #1018#1018 (createdVia + order attribution) merged into develop after the rename
commit was authored, so its new i18n strings still used the old
'wp-graphql-woocommerce' text domain. Update them to 'graphql-for-ecommerce'
to match the rename.
* feat: persist shipping phone through the checkout mutation
The shipping fieldset in Checkout_Mutation::get_checkout_fields() omitted
the phone field, so a phone passed in the checkout mutation's shipping
input was never mapped into shipping_phone and WC_Order::set_shipping_phone()
was never called. Add phone to the shipping fieldset so it flows through to
the order, matching the billing fieldset.
Closes#1016
* fix: load QL session handler when a session token header is present
should_load_session_handler() only matched explicit wc-ajax / WC_DOING_AJAX
and REST_REQUEST contexts. Headless callers drive session state through the
Store-API Cart-Token header or the legacy woocommerce-session header and can
land on other admin-ajax/REST entrypoints, leaving the session bootstrapped
from an absent cookie. Detect either session header and also honor
wp_doing_ajax() so QL_Session_Handler loads and rebuilds the session from the
token.
* ci: authenticate composer GitHub access to fix flaky strauss install
The dependency-install steps run with the github-oauth token that composer
rejects ("contains invalid characters"), so composer and strauss's internal
composer bootstrap fall back to unauthenticated GitHub access. Under the
shared runner IP's 60/hr unauthenticated rate limit, strauss intermittently
exits 1 during post-install-cmd, failing lint, PHPStan, wpunit, functional
and acceptance jobs at random.
Provide a well-formed COMPOSER_AUTH built from the always-available
GITHUB_TOKEN on every dependency-install step so GitHub API access is
authenticated (5000/hr), removing the flake.
* ci: run strauss with a clean composer auth context
setup-php writes the runner's GITHUB_TOKEN into composer's global auth.json,
and this composer rejects that token format ("github oauth token contains
invalid characters"). strauss spins up its own internal Composer instance,
which reads that auth, hits the validation error and exits 1 with no output,
failing every job at the post-install/post-update strauss step.
strauss only rewrites local vendor packages and needs no GitHub auth, so run
it with COMPOSER_AUTH unset and a throwaway COMPOSER_HOME. Fixes all CI
install steps, local installs and release packaging from one place.
This reverts the earlier per-workflow COMPOSER_AUTH attempt, which could not
work because composer rejects the token regardless of how it is supplied.
* style: align equals sign in should_load_session_handler (phpcs)
* 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
* 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
* feat: Add Store API Cart-Token compatibility and session handler improvements
* chore: Linter compliances met
* chore: linter compliances met
* chore: linter compliances met
* fix: product connection resolution refactored to better work with the ProductQuery class
* chore: Linter and PHPStan compliance met
* devops: New product connection tests implemented and passing
* fix: products connection pricing filters fixed
* devops: CartTransactionQueueCest skipped until failing PHP version removed from CI matrix
* 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>
* chore: avoid magic constants [PHPCS]
* chore: change ruleset to wp-graphql-cs and lint
* devops: HPOS added back to CI with the release of WC 3.9
---------
Co-authored-by: Geoff Taylor <geoff@axistaylor.com>