51 Commits
Author SHA1 Message Date
Geoff TaylorandGitHub 088d337ef5 fix: address WordPress.org plugin review (rename + prefixing + headers) (#1019)
* 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.
2026-06-30 10:16:21 -04:00
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 2e25a94314 feat: add session transfer behavior setting for login session handling (#993)
Adds a new "Session Transfer Behavior" setting to the WooGraphQL
settings page that controls how cart/session data is handled when
a user logs in with an existing session from another device:

- keep_new_fallback_old (default): keeps current guest session data,
  falls back to previously saved user session if guest data is empty
- keep_new: always keeps the current guest session data
- keep_old: restores the previously saved user session data
2026-03-24 03:54:21 -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 57f2a1eba0 chore: version numbers and READMEs updated (#883) 2024-08-07 12:54:57 -04:00
Geoff TaylorandGitHub 76e8db510e feat: QL Session Handler refactored to handle non-GraphQL requests (#870)
* 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
2024-08-07 12:39:45 -04:00
Geoff TaylorandGitHub 6f80c4c98a fix: Session transaction queue fix (#832)
* fix: Session transaction queue pop relocated to earlier occurrence in request

* chore: Linter and PHPStan compliance met
2023-12-27 12:01:48 -05: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
f583628199 chore: implement WPGraphQL Coding Standards (#769)
* 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>
2023-07-19 17:11:25 -04:00
Dovid LevineandGitHub 4ed9cb94da chore: use fully-qualified class names for PHPDoc types (#767)
* fix!: update deps to required versions

* chore: use fqcn for PHPDoc types

* chore: cleanup use statements
2023-07-19 16:01:50 -04:00
Dovid LevineandGitHub d4927b9637 fix: use static closures when possible (#764)
* fix!: update deps to required versions

* fix: use static closures when possible
2023-07-19 15:56:42 -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 ba13b2ec0a feat: Authorizing URLs implemented and tested. (#745)
* feat: Authorizing URLs implemented and tested.

* feat: More woographql_*_nonce functions implemented.

* chore: linting changes made.

* chore: linting changes made.

* fix: woographql_*_ functions tested.

* chore: WPCS compliance met.

* devops: lint-code script updated to PHP v8.0

* chore: WPCS compliance met

* devops: TransferSessionHandlerTest & QLSessionHandlerTest updated

* devops: codeclimate.yml added.

* chore: Linter compliance met

* devops: Harmonizing WordPress doc written and Settings doc updated.

* chore: Typo fixed in docs.

* fix: General bugfixes and improvements related to Auth URLs

* devops: More docs.

* chore: Linter compliance met

* chore: small change made to docs.
2023-05-22 13:43:10 -04:00
2b93c07a09 Adds noop for set_customer_session_cookie. (#710)
* Added noop for set_customer_session_cookie.

* fixup! Added noop for set_customer_session_cookie.

---------

Co-authored-by: Andres A <andres@Andress-MBP.home>
2023-03-10 14:38:18 -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
Geoff Taylor adf9c42001 chore: WPCS compliance met 2022-03-15 15:45:04 -04:00
Geoff Taylor 3aa3fbbfe5 hotfix: Syntax errors in QL_Session_Handler refactored 2022-03-15 15:37:27 -04:00
Geoffrey K TaylorandGitHub d70443ddcd fix: QLSessionHandler behaviour changes and QLSessionHandlerTest wpunit test added (#616)
* chore: QLSessionHandlerTest added

* chore: WPCS compliance met

* fix: JWT leeway set in unit test

* fix: Docker environment salts updated

* fix: salts restored

* chore: WPCS compliance met

* chore: JWT::leeway removed from tests

* devops: Uncommented assertion in QLSessionHandlerTest

* chore: WPCS compliance met
2022-03-15 14:39: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
fabiojundevandGitHub bfbeb0dbc4 fix: change deprecated incr_cache_prefix (#598)
method to invalidate_cache_group
2022-01-25 13:35:24 -05:00
Geoffrey K TaylorandGitHub 88aa64b560 fix: session expiration extended to 2 weeks (#551) 2021-09-08 14:57:23 -04:00
Koen PoelhekkeandGitHub 5fe732dcc6 Replace deprecated function nonce_user_logged_out (#547)
* Use maybe_update_nonce_user_logged_out instead of deprecated nonce_user_logged_out function

* Use tab spacing
2021-09-08 02:06:22 -04:00
Geoff Taylor effd712f16 Coding standards met 2021-02-22 19:42:54 -05:00
Geoff Taylor c75a295e0b functional test "CartTransactionQueueCest" added. 2021-02-22 19:42:54 -05:00
Geoff Taylor 01680f5c60 Transaction queue now stored in a transient 2021-02-22 19:41:23 -05:00
Geoff Taylor b8d913ee8d Docker/Codeception CI configuration updated. 2021-01-22 11:36:50 -05:00
Geoff Taylor b7a14f95a1 Session Handler upgraded. 2020-10-01 01:45:26 -04:00
Geoff Taylor bd4f35e4a8 "Testing Integration" + "WPCS" workflows created and passed. 2020-02-20 12:35:42 -05:00
Renato AlvesandGeoff Taylor c8865a832a Code improvements to the mutations (removing unused classes, fixing textdomain, etc) 2020-02-19 17:29:16 -05:00
Geoff Taylor 506868c30a syntax error fixed 2020-01-10 15:30:03 -05:00
Geoff Taylor 25b55dfa36 session handler updated 2020-01-10 14:37:40 -05:00
Geoff Taylor 0de3aa59da syntax error fixed 2020-01-10 14:23:09 -05:00
Geoff Taylor 54454b2c53 Session handler updated 2020-01-10 13:37:40 -05:00
Geoff Taylor 0ca8a22e16 transaction queue callback cleaned up 2019-12-23 22:04:55 -05:00
Geoff Taylor 0556e4fa89 transaction queue optimized 2019-12-23 21:19:27 -05:00
Geoff Taylor 6e9a82e8e3 sleep interval updated 2019-12-23 21:07:27 -05:00
Geoff Taylor 8f99b2a7ed syntax error fixed. 2019-12-23 21:02:53 -05:00
Geoff Taylor abb2eab5ca transaction managment implemented 2019-12-23 20:54:28 -05:00
Geoff Taylor e40c78f9c2 initial commit 2019-11-25 20:01:35 -05:00
Geoff Taylor 4d65a36e7c bug fixed in "QL_Session_Handler". 2019-11-25 17:02:50 -05:00
Geoff Taylor 5bba503cd7 More changes to the "QL_Session_Handler" 2019-11-24 23:54:50 -05:00
Geoff Taylor bcd5e60ce1 Error handling added for session token validation. 2019-11-20 23:16:23 -05:00
Geoff Taylor 8a4f671ca2 "QL_Session_Handler" heavily refactored 2019-11-18 16:18:13 -05:00
Geoff Taylor 22deb98fe9 Namespaces refactored. 2019-10-25 19:13:36 -04:00
Geoff Taylor afeac37d56 NewCustomerCheckingOutCept updated. 2019-08-27 11:57:52 -04:00
Geoff Taylor 70f10dca0c fixed bug concerning guest sessions. 2019-07-15 17:12:30 -04:00
Geoff Taylor ab469a350e QL Session Handler implemented 2019-06-20 14:14:13 -04:00