* 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.
* 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
* 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
* 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
* - 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>
* 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
* 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
* 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>
* fix: product variation raw price not visible for public users
* fixup! fix: product variation raw price not visible for public users
* fixup! fixup! fix: product variation raw price not visible for public users
* chore: WPCS compliance met
Co-authored-by: Andres A <andres@Andress-MacBook-Pro.local>
Co-authored-by: Geoff Taylor <geoff@axistaylor.com>
$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.