52 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 858887fa78 devops: Variable product performance optimization (#1006)
* devops: Variable product performance optimization and tests

- Memoize get_variation_prices() in the Product model to avoid
  redundant lookups across multiple pricing fields (price, regularPrice,
  salePrice, and their RAW variants)
- Remove redundant post__in filter from variations connection resolver;
  post_parent already constrains the query, and the post__in triggered
  an extra get_children() call per product
- Add createVariableProductCatalog() helper to GraphQLE2E for creating
  variable products with many variations in tests
- Add VariableProductPerformanceTest (wpunit) measuring DB query count
  and duration for 15 variable products with 18 variations each
- Add VariableProductPerformanceCest (functional) verifying 6 rapid
  queries do not return 429 errors

Addresses #897

* fix: Skip timing assertion when xdebug is active and clean up debug code
2026-03-31 09:17:44 -04:00
Geoff TaylorandGitHub b6576d4125 feat: Product and product attribute mutations (#851)
* devops: Product and product attribute mutation tests generated

* feat: Product Mutations implemented and tested

* chore: Linter and PHPStan compliance met

* fix: resolve test failures in product and variation mutation tests

- Removed duplicate requires for payment-method classes (rebase artifact)
- Wrapped bare `attributes` queries in `... on SimpleProduct` inline
  fragments (attributes field is on ProductWithAttributes interface,
  not the base Product type)
- Fixed attribute label expectations to match factory output (lowercase)
- Fixed relay ID prefix from 'product'/'product_variation' to 'post'
  to match WPGraphQL's actual encoding
- Cache WP_Post before force-deletion and re-cache after so the Product
  model's type resolver can still determine the GraphQL type in the
  response
- Added wp_cache_flush() before asserting product deletion to avoid
  false positives from the re-cached post

* chore: fix PHPCS lint errors in mutation files

* fix: resolve CI test failures for attribute and variation mutations

- Fixed ProductVariation type registration in schema filters so the
  variation mutation output field resolves correctly
- Renamed attribute slug from 'pattern' to 'fabric' in
  ProductAttributeMutationsTest to avoid collision with the pattern
  attribute created by ProductAttributeQueriesTest
- Fixed PHPStan errors for redundant is_wp_error checks
- Updated IntrospectionQueryTest
2026-03-20 13:31:13 -04:00
Geoff TaylorandGitHub b718b87d2e fix: Better support for private and password protected products implemented (#925) 2025-02-27 10:22:36 -05: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 d9d968ac91 fix: product connection resolution refactored to better work with the ProductQuery class (#880)
* 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
2024-08-06 18:07:37 -04:00
Geoffrey K TaylorandGitHub 134dc5eaf7 feat: "found" field added to the Products Connection types (#804) 2023-09-15 23:31:24 -04:00
Geoffrey K TaylorandGitHub c526a5b527 feat: ProductWithAttributes and ProductVariation interfaces added (#803)
* feat: ProductWithAttributes and ProductVariation interfaces added

* chore: Unused files removed
2023-09-15 21:03:55 -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
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
7343ab2174 Fix wrong arg in sale place wc_get_price_to_display and remove wc_get_price_to_display from raw price. (#716)
Co-authored-by: Andres A <andres@Andress-MacBook-Pro.local>
2023-03-17 14:52:15 -04:00
bde5fc5bbd Adds tax calculation to regular and sale prices. (#714)
* Adds tax calculation to regular and sale prices.

* fixup! Adds tax calculation to regular and sale prices.

* Fix phpunit deprecated method.

* fixup! Fix phpunit deprecated method.

* fixup! fixup! Fix phpunit deprecated method.

* Fix missing param in function.

* Fix linting.

---------

Co-authored-by: Andres A <andres@Andress-MBP.home>
2023-03-10 13:46:39 -05:00
Geoffrey K TaylorandGitHub 82e5e72ff9 fix: Product "price" field now supports the "taxes included" display … (#703)
* fix: Product "price" field now supports the "taxes included" display setting.

* chore: WPCS compliance met.
2023-02-01 17:53:20 -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 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
Geoffrey K TaylorandGitHub aa55a3b768 fix: updateReview input requirements fixed (#570)
* fix: updateReview input requirements fixed

* chore: coding standards met
2021-10-22 18:12:37 -04:00
Deepak MittalandGitHub b0fb2a2e28 Fix raw pricing returning null (#544)
$prices['price'] doesn't exist as $prices variable has already been overwritten inside the switch case. This causes pricing to return null for all pricing fields (regular, sale, price) which are formatted as RAW.
2021-09-08 02:02:25 -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 888ac9696d autoloader files rebuilt 2021-02-26 19:21:39 -05:00
Geoff Taylor 1e809bbf20 ci workflow updated. 2021-01-27 00:27:47 -05:00
Geoff Taylor 9677867fb7 Variable product pricing ranges fixed. 2021-01-26 17:03:44 -05:00
Geoff Taylor aacb6bf2bf Workflow badges updated. 2021-01-22 11:37:18 -05:00
Geoff Taylor cee407973f product model field filters implemented 2020-10-22 16:01:35 -04:00
Geoff Taylor 80b87eb019 Large refactor of Post models 2020-09-22 08:17:01 -04:00
Geoff TaylorandGeoff Taylor 331bfe52eb Crud_CPT renamed to WC_Post 2020-09-21 14:49:32 -04:00
Geoff Taylor 449d3b1674 "typeId" fields replaced by "databaseId". 2020-09-16 16:32:14 -04:00
Geoff Taylor 589cede136 Support for some node interfaces added to the product and order models. 2020-09-07 16:42:59 -04:00
Geoffrey K TaylorandGitHub f2a6a3d486 Merge pull request #332 from kidunot89/bugfix/price-format-permission-removed
Field caps removed from product raw price and description fields.
2020-09-07 14:10:46 -04:00
Geoff Taylor f221571458 Grouped product and product variation connection tests refactored. 2020-09-03 16:53:42 -04:00
Geoff Taylor fe46ea088f Field caps removed from product raw price and description fields. 2020-08-11 19:36:47 -04:00
Geoff Taylor 664bacf429 Heavy refactor of productconnection "resolve" functions. 2020-08-07 10:35:21 -04:00
Geoff Taylor bd4f35e4a8 "Testing Integration" + "WPCS" workflows created and passed. 2020-02-20 12:35:42 -05:00
Renato AlvesandGeoff Taylor 4f8db36422 Cleaning the model classes 2020-02-19 17:29:16 -05:00
Geoff Taylor 190f322994 new field cap check set. 2020-01-11 15:39:04 -05:00
Geoff Taylor 6e93aa245f Woocommerce cart resolvers updated. 2019-12-03 16:26:10 -05:00
Geoff Taylor 46661913dd Product "link" fixed. 2019-11-13 21:06:01 -05:00
Geoff Taylor d7f16c99a1 "link" field added to "Product" interface. 2019-11-04 22:49:03 -05:00
Geoff Taylor 22deb98fe9 Namespaces refactored. 2019-10-25 19:13:36 -04:00
Geoff Taylor 971f4eaf0f ""ProductUnion" type implemented. 2019-10-17 21:39:38 -04:00
Geoff Taylor f9fde20329 "format" argument added to Product fields "description" and "shortDescription". 2019-09-03 15:36:48 -04:00
Geoff Taylor ad82310c0a crud loader refactored 2019-07-09 03:55:55 -04:00
Geoff Taylor acf2643c6a "Order_Mutation" class and "Order_Create" class refactor complete."
;
2019-07-04 14:11:06 -04:00
Geoff Taylor fccf7b98dd Placemarker before Order_Mutation refactor 2019-07-03 18:25:18 -04:00
Geoffrey K TaylorandGitHub f96a71ba68 Removes null ID from attributes resolver 2019-06-28 10:30:33 -04:00
Geoff Taylor 3c0bcd3cda Cacheable global ID add to ProductAttribute type. 2019-06-23 09:23:17 -04:00
Geoff Taylor c60814f649 More tests added to Product and ProductVariation. 2019-06-05 19:15:37 -04:00
Geoff Taylor 606832aa5e Formatting functionality implemented for Product and ProductVariation types. CartMutationsTest updated. 2019-06-03 13:48:29 -04:00
Geoff Taylor 2f256f19c6 Variable-type product formatting added. 2019-06-02 00:06:32 -04:00