diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 508b2a50..0d8804cf 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,6 +1,6 @@
-## Contribute to WPGraphQL WooCommerce
+## Contribute to WPGraphQL for WooCommerce
-WPGraphQL WooCommerce (WooGraphQL) welcomes community contributions, bug reports and other constructive feedback.
+WPGraphQL for WooCommerce (WooGraphQL) welcomes community contributions, bug reports and other constructive feedback.
When contributing please ensure you follow the guidelines below so that we can keep on top of things.
diff --git a/README.md b/README.md
index 312d7230..f923e9a7 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-
+
-# WPGraphQL WooCommerce (WooGraphQL)
+# WPGraphQL for WooCommerce
Website • Docs • Schema • Playground • About • Join Slack
-[](https://github.com/wp-graphql/wp-graphql-woocommerce/actions?query=workflow%3A%22Automated-Testing%22) [](https://github.com/wp-graphql/wp-graphql-woocommerce/actions?query=workflow%3A%22Coding-Standards%22) [](https://coveralls.io/github/wp-graphql/wp-graphql-woocommerce?branch=develop) [](https://opencollective.com/woographql)
+[](https://github.com/wp-graphql/wp-graphql-woocommerce/actions?query=workflow%3A%22Automated-Testing%22) [](https://github.com/wp-graphql/wp-graphql-woocommerce/actions/workflows/lint-code.yml) [](https://coveralls.io/github/wp-graphql/wp-graphql-woocommerce?branch=develop) [](https://opencollective.com/woographql)
## Install
@@ -21,7 +21,7 @@
**This method is recommended for users with unique installations like WP Bedrock or SpinupWP.**
1. Install [WordPress](https://composer.rarst.net/) and [WooCommerce](https://wpackagist.org/search?q=woocommerce&type=plugin&search=).
-2. Install WPGraphQL and WooGraphQL by running `composer require wp-graphql/wp-graphql wp-graphql/wp-graphql-woocommerce`.
+2. Install WPGraphQL and WPGraphQL for WooCommerce by running `composer require wp-graphql/wp-graphql wp-graphql/wp-graphql-woocommerce`.
3. Set your GraphQL client endpoint to your site's GraphQL endpoint. For typical Bedrock or SpinupWP setups, the default will be `your-store.domain/wp/graphql`.
### Optional Extras
@@ -61,9 +61,9 @@ WooCommerce's Custom Post Types (CPTs) and most data objects are managed by a da
This flexibility also lets WooCommerce store metadata for these CPTs in separate tables, and the data doesn't necessarily have to reside in the same database.
-The data store system and its object managers are WooGraphQL's primary contact points. Unlike standard CPTs, which use a **WP_Post** object for data sourcing and a **WPGraphQL\Model\Post** object for modeling, WooGraphQL engages object managers for its data source. Each object type has a unique model with distinct permissions and restrictions.
+The data store system and its object managers are WooGraphQL's primary contact points. Unlike standard CPTs, which use a **WP_Post** object for data sourcing and a **WPGraphQL\Model\Post** object for modeling, WPGraphQL for WooCommerce engages object managers for its data source. Each object type has a unique model with distinct permissions and restrictions.
-Such a setup has resulted in some disparities between the schema where WooGraphQL support might be lacking. We apologize for any inconvenience. Both I and the entire **WPGraphQL** team are actively working to harmonize WooGraphQL with all **WPGraphQL** and **WPGraphQL ACF** features.
+Such a setup has resulted in some disparities between the schema where WPGraphQL for WooCommerce support might be lacking. We apologize for any inconvenience. Both I and the entire **WPGraphQL** team are actively working to harmonize WPGraphQL for WooCommerce with all **WPGraphQL** and **WPGraphQL ACF** features.
Thank you for your patience :smile:
[@kidunot89](https://github.com/kidunot89)
@@ -75,7 +75,7 @@ Thank you for your patience :smile:
## For WooCommerce Extensions Support
-**[WooGraphQL Pro](https://woographql.com/pro)** is an extension of WPGraphQL WooCommerce that provides compatibility with a variety of popular WooCommerce extensions. This compatibility empowers you to leverage these extensions within the context of the GraphQL API, thereby enabling you to build more dynamic and powerful headless eCommerce applications.
+**[WooGraphQL Pro](https://woographql.com/pro)** is an extension of WPGraphQL for WooCommerce that provides compatibility with a variety of popular WooCommerce extensions. This compatibility empowers you to leverage these extensions within the context of the GraphQL API, thereby enabling you to build more dynamic and powerful headless eCommerce applications.
The following WooCommerce extensions are supported by WooGraphQL Pro:
@@ -109,7 +109,7 @@ To enable schema support for your installed extensions, follow these steps:
1. Navigate to the WPGraphQL settings page on your WordPress Admin Dashboard.
2. Click on the 'WooGraphQL' tab.
-3. Here, you'll find a list of WooGraphQL configuration options. Go below to the **WooGraphQL Pro** section and paste in license and check the boxes next to your installed extensions to enable schema support for them.
+3. Here, you'll find a list of WPGraphQL for WooCommerce configuration options. Go below to the **WooGraphQL Pro** section and paste in license and check the boxes next to your installed extensions to enable schema support for them.
Note: The 'Enable Unsupported Product Type' option can be found on the same settings tab. If you enable this option, any product type without a proper GraphQL type will default to the `UnsupportedProduct` type, which is identical to the `SimpleProduct` type. With this type, the client can use the `metaData` field to get a `string` representation of the meta data on the type. This could potentially be all that's needed for simpler product types.
@@ -125,7 +125,7 @@ Feel free to test out the extension using this [GraphiQL Playground](https://woo
### `create-woonext-app` CLI and `@woographql` packages
-Designed to both streamline development for individuals and teams looking to utilize WooCommerce + WooCommerce extensions in larger project and not waste too much to much time on the particulars of WooGraphQL like session management or checkout, the **[`create-woonext-app`](https://www.npmjs.com/package/create-woonext-app)** CLI generates a pre-created e-commerce application on [Next.js](https://nextjs.org) application tailored to the developer/team.
+Designed to both streamline development for individuals and teams looking to utilize WooCommerce + WooCommerce extensions in larger project and not waste too much to much time on the particulars of WPGraphQL for WooCommerce like session management or checkout, the **[`create-woonext-app`](https://www.npmjs.com/package/create-woonext-app)** CLI generates a pre-created e-commerce application on [Next.js](https://nextjs.org) application tailored to the developer/team.
```bash
npx create-woonext-app [options]
@@ -138,12 +138,12 @@ The generated application utilizes the **[`@woographql`](https://yeetsquad.net)*
- [`create-woonext-app` Live Demo](https://woonext.woographql.com/): fully decked out putting all current possible functionalities of the `create-woonext-app` on full display.
- [`@woographql/next` README](https://yeetsquad.net/-/web/detail/@woographql/next): A Template generator CLI. Capable of generator a multitude of Next.js pages, Next.js Route Handlers, react components, react hooks, and utilities. It's also equipped to generate react component and hook stubs for speedy component create with no boilerplate.
- [`@woographql/react-hooks` README](https://yeetsquad.net/-/web/detail/@woographql/react-hooks): React hook library acting as the backbone for UI connected to session, cart, and customer.
-- [`@woographql/session-utils` README](https://yeetsquad.net/-/web/detail/@woographql/session-utils): Provides utilities for managing the WPGraphQL + WooGraphQL session tokens like a `TokenManager`, also provides interfaces and types for easy customization of said `TokenManager` or the complete creation of a custom `TokenManager` with minimal effort. The bundled TokenManager implemented utilizes browser storage _(Local/Session storage)_, so if you'd prefer something like [Iron Session](https://github.com/vvo/iron-session) this might be the route for you.
+- [`@woographql/session-utils` README](https://yeetsquad.net/-/web/detail/@woographql/session-utils): Provides utilities for managing the WPGraphQL + WPGraphQL for WooCommerce session tokens like a `TokenManager`, also provides interfaces and types for easy customization of said `TokenManager` or the complete creation of a custom `TokenManager` with minimal effort. The bundled TokenManager implemented utilizes browser storage _(Local/Session storage)_, so if you'd prefer something like [Iron Session](https://github.com/vvo/iron-session) this might be the route for you.
- [`@woographql/codegen` README](https://yeetsquad.net/-/web/detail/@woographql/codegen): A convenient wrapper for GraphQL Codegen providing a few configurations out of the box, with the ability to override the default configuration by creating a `codegen.ts` in the project root.
## Wanna help support WooGraphQL's future
-- Sponsor **@kidunot89** _(WooGraphQL Creator/Developer)_ on **[Github](https://github.com/sponsors/kidunot89)**
+- Sponsor **@kidunot89** _(WPGraphQL for WooCommerce Creator/Developer)_ on **[Github](https://github.com/sponsors/kidunot89)**
- Sponsor **WooGraphQL** on **[OpenCollective](https://opencollective.com/woographql)**
- Sponsor **WPGraphQL** on **[OpenCollective](http://opencollective.com/wp-graphql)**
- Sponsor **GraphQL-PHP** on **[OpenCollective](https://opencollective.com/webonyx-graphql-php)**
@@ -154,12 +154,15 @@ The generated application utilizes the **[`@woographql`](https://yeetsquad.net)*
## Demo/Examples
- Examples with Next.js
- - [WooGraphQL Demo](https://github.com/kidunot89/woographql-demo)
+ - [WPGraphQL for WooCommerce Demo](https://github.com/kidunot89/woographql-demo)
- [Next.js WooCommerce Theme](https://github.com/imranhsayed/woo-next) [[source]](https://github.com/imranhsayed/woo-next) [[demo video]](https://youtu.be/EGjY3X868YQ)
- Examples with Gatsby
- [Gatsby WooCommerce Theme](https://gatsby-woocommerce-theme.netlify.app/) [[source]](https://github.com/imranhsayed/gatsby-woocommerce-themes) [[demo video]](https://youtu.be/ygaE8ZdPEX8)
+- Examples with WooGraphQL Pro [[homepage]](https://woographql.com/pro)
+ - [`create-woonext-app` CLI Demo](https://woonext.woographql.com) [[homepage]](https://woographql.com/create-woonext-app) [[docs]](https://www.npmjs.com/package/create-woonext-app)
+ - [WPGraphQL for WooCommerce homepage](https://woographql.com)
-## Who using WooGraphQL
+## Who using it?
|
|
|
|
|:---------------------------------------:|:---------------------------------------:|:---------------------------------------:|
@@ -194,3 +197,5 @@ Support this project with your organization. Your logo will show up here with a
+
+**Disclaimer:** *WPGraphQL for WooCommerce* is an open-source WordPress plugin and WooCommerce extension developed and maintained by [Geoff Taylor](https://woographql.com/about), licensed under GPLv3. It is not owned, maintained, or affiliated with [Automattic](https://automattic.com) or [WooCommerce](https://woocommerce.com).
diff --git a/README.txt b/README.txt
index 0e9f1791..6ecf12f9 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-=== WPGraphQL WooCommerce ===
+=== WPGraphQL for WooCommerce ===
Contributors: kidunot89, ranaaterning, jasonbahl, saleebm
Tags: GraphQL, WooCommerce, WPGraphQL
Requires at least: 6.1
diff --git a/access-functions.php b/access-functions.php
index d86529e7..dd785bb0 100644
--- a/access-functions.php
+++ b/access-functions.php
@@ -219,7 +219,7 @@ function wc_graphql_camel_case_to_underscore( $str ) {
if ( ! function_exists( 'woographql_setting' ) ) :
/**
- * Get an option value from WooGraphQL settings
+ * Get an option value from WPGraphQL for WooCommerce settings
*
* @param string $option_name The key of the option to return.
* @param mixed $default_value The default value the setting should return if no value is set.
@@ -297,7 +297,7 @@ function woographql_get_session_token() {
if ( ! function_exists( 'woographql_create_nonce' ) ) :
/**
- * Creates WooGraphQL session transfer nonces.
+ * Creates WPGraphQL for WooCommerce session transfer nonces.
*
* @param string|int $action Nonce name.
*
@@ -314,7 +314,7 @@ function woographql_create_nonce( $action = -1 ) {
if ( ! function_exists( 'woographql_verify_nonce' ) ) :
/**
- * Validate WooGraphQL session transfer nonces.
+ * Validate WPGraphQL for WooCommerce session transfer nonces.
*
* @param string $nonce Nonce to validated.
* @param integer|string $action Nonce name.
diff --git a/composer.json b/composer.json
index 5936d4d1..3aa7124a 100644
--- a/composer.json
+++ b/composer.json
@@ -40,8 +40,7 @@
"allow-plugins": {
"johnpbloch/wordpress-core-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
- "phpstan/extension-installer": true,
- "composer/installers": true
+ "phpstan/extension-installer": true
}
},
"autoload": {
diff --git a/composer.lock b/composer.lock
index 69228781..1ec27587 100644
--- a/composer.lock
+++ b/composer.lock
@@ -185,16 +185,16 @@
},
{
"name": "axepress/wp-graphql-stubs",
- "version": "v1.27.1",
+ "version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/AxeWP/wp-graphql-stubs.git",
- "reference": "84ef51264b142d92c0ac9aa39edf2cce5f0ac3af"
+ "reference": "79bc096361b1bf65a6b367a382fa90407d8952ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/AxeWP/wp-graphql-stubs/zipball/84ef51264b142d92c0ac9aa39edf2cce5f0ac3af",
- "reference": "84ef51264b142d92c0ac9aa39edf2cce5f0ac3af",
+ "url": "https://api.github.com/repos/AxeWP/wp-graphql-stubs/zipball/79bc096361b1bf65a6b367a382fa90407d8952ba",
+ "reference": "79bc096361b1bf65a6b367a382fa90407d8952ba",
"shasum": ""
},
"require": {
@@ -225,7 +225,7 @@
],
"support": {
"issues": "https://github.com/AxeWP/wp-graphql-stubs/issues",
- "source": "https://github.com/AxeWP/wp-graphql-stubs/tree/v1.27.1"
+ "source": "https://github.com/AxeWP/wp-graphql-stubs/tree/v1.29.0"
},
"funding": [
{
@@ -233,7 +233,7 @@
"type": "github"
}
],
- "time": "2024-07-04T12:37:29+00:00"
+ "time": "2024-09-20T01:43:19+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
@@ -359,16 +359,16 @@
},
{
"name": "php-stubs/wordpress-stubs",
- "version": "v6.6.0",
+ "version": "v6.6.2",
"source": {
"type": "git",
"url": "https://github.com/php-stubs/wordpress-stubs.git",
- "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2"
+ "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/86e8753e89d59849276dcdd91b9a7dd78bb4abe2",
- "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc",
+ "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc",
"shasum": ""
},
"require-dev": {
@@ -401,9 +401,9 @@
],
"support": {
"issues": "https://github.com/php-stubs/wordpress-stubs/issues",
- "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.0"
+ "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.2"
},
- "time": "2024-07-17T08:50:38+00:00"
+ "time": "2024-09-30T07:10:48+00:00"
},
{
"name": "phpcompatibility/php-compatibility",
@@ -777,22 +777,22 @@
},
{
"name": "phpstan/extension-installer",
- "version": "1.4.1",
+ "version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/phpstan/extension-installer.git",
- "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203"
+ "reference": "85e90b3942d06b2326fba0403ec24fe912372936"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203",
- "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203",
+ "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936",
+ "reference": "85e90b3942d06b2326fba0403ec24fe912372936",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2 || ^8.0",
- "phpstan/phpstan": "^1.9.0"
+ "phpstan/phpstan": "^1.9.0 || ^2.0"
},
"require-dev": {
"composer/composer": "^2.0",
@@ -813,24 +813,28 @@
"MIT"
],
"description": "Composer plugin for automatic installation of PHPStan extensions",
+ "keywords": [
+ "dev",
+ "static analysis"
+ ],
"support": {
"issues": "https://github.com/phpstan/extension-installer/issues",
- "source": "https://github.com/phpstan/extension-installer/tree/1.4.1"
+ "source": "https://github.com/phpstan/extension-installer/tree/1.4.3"
},
- "time": "2024-06-10T08:20:49+00:00"
+ "time": "2024-09-04T20:21:43+00:00"
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.29.1",
+ "version": "1.33.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4"
+ "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4",
- "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140",
+ "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140",
"shasum": ""
},
"require": {
@@ -862,22 +866,22 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0"
},
- "time": "2024-05-31T08:52:43+00:00"
+ "time": "2024-10-13T11:25:22+00:00"
},
{
"name": "phpstan/phpstan",
- "version": "1.11.8",
+ "version": "1.12.7",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec"
+ "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
- "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
+ "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
"shasum": ""
},
"require": {
@@ -922,7 +926,7 @@
"type": "github"
}
],
- "time": "2024-07-24T07:01:22+00:00"
+ "time": "2024-10-18T11:12:07+00:00"
},
{
"name": "sirbrillig/phpcs-variable-analysis",
@@ -1049,16 +1053,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.10.2",
+ "version": "3.10.3",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017"
+ "reference": "62d32998e820bddc40f99f8251958aed187a5c9c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017",
- "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c",
+ "reference": "62d32998e820bddc40f99f8251958aed187a5c9c",
"shasum": ""
},
"require": {
@@ -1125,7 +1129,7 @@
"type": "open_collective"
}
],
- "time": "2024-07-21T23:26:44+00:00"
+ "time": "2024-09-18T10:38:58+00:00"
},
{
"name": "symfony/polyfill-php73",
diff --git a/docs/configuring-graphql-client-for-user-session.md b/docs/configuring-graphql-client-for-user-session.md
index 4ef35a22..ab141f75 100644
--- a/docs/configuring-graphql-client-for-user-session.md
+++ b/docs/configuring-graphql-client-for-user-session.md
@@ -1,6 +1,6 @@
---
title: "Configuring GraphQL Client for User Session"
-description: "A step-by-step guide on how to configure your GraphQL client to handle user sessions, authentication, and more when working with WooGraphQL and WPGraphQL."
+description: "A step-by-step guide on how to configure your GraphQL client to handle user sessions, authentication, and more when working with WPGraphQL for WooCommerce and WPGraphQL."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, user session, authentication, configuration, client"
author: "Geoff Taylor"
---
@@ -13,9 +13,9 @@ By properly handling the session token, you can implement session pass-off funct
## Sending the `woocommerce-session` HTTP request header
-When using WooGraphQL cart and customer functionality, there are certain prerequisites. A WooGraphQL session token, distributed by the QL Session Handler, must be passed as an HTTP header with the name `woocommerce-session`, prefixed with `Session `. This header should be included in all session data-altering mutations. Note that the required name `woocommerce-session` can be changed using WordPress filters.
+When using WPGraphQL for WooCommerce cart and customer functionality, there are certain prerequisites. A WPGraphQL for WooCommerce session token, distributed by the QL Session Handler, must be passed as an HTTP header with the name `woocommerce-session`, prefixed with `Session `. This header should be included in all session data-altering mutations. Note that the required name `woocommerce-session` can be changed using WordPress filters.
-For simple requests using `fetch`, this is quite easy to implement. Here's an example of a WooGraphQL request executed with `fetch`, performing a cart query and passing the woocommerce-session header with a value of `Session ${sessionToken}`. The `sessionToken` is read from `localStorage`.
+For simple requests using `fetch`, this is quite easy to implement. Here's an example of a WPGraphQL for WooCommerce request executed with `fetch`, performing a cart query and passing the woocommerce-session header with a value of `Session ${sessionToken}`. The `sessionToken` is read from `localStorage`.
```javascript
fetch(endpoint, {
@@ -286,7 +286,7 @@ This is the scary looking part if you are not familar with observables, so let m
Our usage here is to tell Apollo to retry the last operation after we have retrieved a new token with `getSessionToken` if the current `graphQLError` matches any of our targetted errors, otherwise `observable` is left as an `undefined` value and Apollo continues as normal.
-Next is the `createUpdateLink` callback, responsible for retrieving an updated `sessionToken` from the `woocommerce-session` HTTP response token. The reason for this is the session token generated by WooGraphQL is self-managing and a new token with an updated expiration time of 14 days from the last action is generated on each request that a `woocommerce-session` HTTP request header is sent. To retrieve and store this updated token we use Apollo afterware.
+Next is the `createUpdateLink` callback, responsible for retrieving an updated `sessionToken` from the `woocommerce-session` HTTP response token. The reason for this is the session token generated by WPGraphQL for WooCommerce is self-managing and a new token with an updated expiration time of 14 days from the last action is generated on each request that a `woocommerce-session` HTTP request header is sent. To retrieve and store this updated token we use Apollo afterware.
## Defining the `createUpdateLink` function
diff --git a/docs/development-w-docker.md b/docs/development-w-docker.md
index 7cb9ae25..a8e75ea1 100644
--- a/docs/development-w-docker.md
+++ b/docs/development-w-docker.md
@@ -1,7 +1,7 @@
---
title: "Development w/ Docker"
author: "Geoff Taylor"
-description: "A simple to follow guide on using the WooGraphQL App Docker Image."
+description: "A simple to follow guide on using the WPGraphQL for WooCommerce App Docker Image."
keywords: ""
---
diff --git a/docs/handling-user-authentication.md b/docs/handling-user-authentication.md
index 16f965da..56a2deb3 100644
--- a/docs/handling-user-authentication.md
+++ b/docs/handling-user-authentication.md
@@ -1,6 +1,6 @@
---
title: "Handling User Authentication with WooGraphQL"
-description: "Learn how to handle user authentication in your headless WooCommerce application using WooGraphQL and WPGraphQL for secure and seamless user experiences."
+description: "Learn how to handle user authentication in your headless WooCommerce application using WPGraphQL for WooCommerce and WPGraphQL for secure and seamless user experiences."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, user authentication, login, register, secure, headless"
author: "Geoff Taylor"
---
@@ -58,7 +58,7 @@ const RefreshAuthTokenDocument = gql`
`;
```
-To help you understand the differences, let's briefly discuss how the session token and auth token handle renewal. As stated in the previous section session tokens are self-managed and renewed automatically by WooGraphQL when sent within the 14 day limit, and an updated session token is generated on every request. All you have to do is retrieve it. Auth tokens, on the other hand, require you to use the mutation above and the refresh token that's distributed with the auth token to get a new auth token before the auth token expires, which is approximately 15 minutes after creation 😅.
+To help you understand the differences, let's briefly discuss how the session token and auth token handle renewal. As stated in the previous section session tokens are self-managed and renewed automatically by WPGraphQL for WooCommerce when sent within the 14 day limit, and an updated session token is generated on every request. All you have to do is retrieve it. Auth tokens, on the other hand, require you to use the mutation above and the refresh token that's distributed with the auth token to get a new auth token before the auth token expires, which is approximately 15 minutes after creation 😅.
@@ -251,4 +251,4 @@ Just like with `fetchSessionToken()`, it is highly recommended that you obscure
In summary, we demonstrated how to configure a GraphQL client to work with WooGraphQL, manage WooCommerce sessions, and handle WordPress authentication. With this setup, you should be able to create a robust and secure client that manages user authentication efficiently and seamlessly.
-The next section will begin teaching how you best utilize the data received from WooGraphQL to create showstopping components.
+The next section will begin teaching how you best utilize the data received from WPGraphQL for WooCommerce to create showstopping components.
diff --git a/docs/handling-user-session-and-using-cart-mutations.md b/docs/handling-user-session-and-using-cart-mutations.md
index 9ca63f7e..096a3d51 100644
--- a/docs/handling-user-session-and-using-cart-mutations.md
+++ b/docs/handling-user-session-and-using-cart-mutations.md
@@ -1,6 +1,6 @@
---
title: "Handling User Session and Using Cart Mutations with WooGraphQL"
-description: "Discover how to manage user sessions and perform cart mutations using WooGraphQL and WPGraphQL in your headless WooCommerce application for a smooth shopping experience."
+description: "Discover how to manage user sessions and perform cart mutations using WPGraphQL for WooCommerce and WPGraphQL in your headless WooCommerce application for a smooth shopping experience."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, user session, cart mutations, headless, shopping experience"
author: "Geoff Taylor"
---
@@ -13,7 +13,7 @@ In this section, we will demonstrate how to implement cart controls on the singl
- Basic knowledge of React and React Router.
- Familiarity with GraphQL and WPGraphQL.
-- A WPGraphQL/WooGraphQL backend.
+- A WPGraphQL/WPGraphQL for WooCommerce backend.
- Read previous sections on [Routing By URI](routing-by-uri.md) and [Using Product Data](using-product.data.md)
## Step 0: Create our `graphql.js` file
diff --git a/docs/harmonizing-with-wordpress.md b/docs/harmonizing-with-wordpress.md
index 8a50e75d..93ecdc85 100644
--- a/docs/harmonizing-with-wordpress.md
+++ b/docs/harmonizing-with-wordpress.md
@@ -13,7 +13,7 @@ Our checkout button's `href` attribute will be a nonced URL that directs the use
## Enabling Dedicated Router and Nonce Generation
-Before starting with the checkout button creation, we need to activate the dedicated router and nonce generation feature introduced in WooGraphQL v0.13.0. To do this, enable the "User Session transferring URLs" option in your WooGraphQL settings. Also, make sure to check the "Checkout URL" checkbox under this option.
+Before starting with the checkout button creation, we need to activate the dedicated router and nonce generation feature introduced in WPGraphQL for WooCommerce v0.13.0. To do this, enable the "User Session transferring URLs" option in your WPGraphQL for WooCommerce settings. Also, make sure to check the "Checkout URL" checkbox under this option.

@@ -37,9 +37,9 @@ Although our checkout button is now functional, it's important to note that the
### Improving Security with Client Session ID
-The first step is to create a "Client Session ID" in our app and pass it to the WooCommerce session using the `updateSession` mutation. This mutation allows us to set session metadata directly in the WooCommerce session data object. The `client_session_id` meta is used by WooGraphQL to create the nonce.
+The first step is to create a "Client Session ID" in our app and pass it to the WooCommerce session using the `updateSession` mutation. This mutation allows us to set session metadata directly in the WooCommerce session data object. The `client_session_id` meta is used by WPGraphQL for WooCommerce to create the nonce.
-If WooGraphQL cannot find this meta, it generates one on the server, making the URL potentially usable on any machine. This is why it's important to avoid an arbitrary string as the session ID. Instead, we should use a value tied to the user's machine, like their IP or User Agent. Afterward, this value should be one-way hashed for increased security.
+If WPGraphQL for WooCommerce cannot find this meta, it generates one on the server, making the URL potentially usable on any machine. This is why it's important to avoid an arbitrary string as the session ID. Instead, we should use a value tied to the user's machine, like their IP or User Agent. Afterward, this value should be one-way hashed for increased security.
Furthermore, we also need to set the `client_session_id_expiration` as a string value representing the expiration time in seconds. For example, to set an expiration time of one hour from now, we could use: `Math.floor(new Date().getTime() / 1000) + 3600`.
@@ -72,11 +72,11 @@ const input = {
}
```
-When the `client_session_id` or `client_session_id_expiration` values become invalid or expired, WooGraphQL generates new values with an expiration time of one hour. To avoid this, we recommend that you periodically update these values from the client side and retrieve a new `checkoutUrl` each time.
+When the `client_session_id` or `client_session_id_expiration` values become invalid or expired, WPGraphQL for WooCommerce generates new values with an expiration time of one hour. To avoid this, we recommend that you periodically update these values from the client side and retrieve a new `checkoutUrl` each time.
## Reinventing Security: The Client-Side Nonce
-Next we're going to explore an advanced approach to enhance the security of our checkout procedure by generating a nonce on the client side. By doing this, and not pulling the Nonces or Auth URLs from WooGraphQL we remove any risk of leakage thru GraphQL request and further protect the end-user's data and the WordPress backend. This process will involve recreating some PHP and WordPress core functions in JavaScript.
+Next we're going to explore an advanced approach to enhance the security of our checkout procedure by generating a nonce on the client side. By doing this, and not pulling the Nonces or Auth URLs from WPGraphQL for WooCommerce we remove any risk of leakage thru GraphQL request and further protect the end-user's data and the WordPress backend. This process will involve recreating some PHP and WordPress core functions in JavaScript.
1. **PHP `time` Function in JavaScript**
@@ -120,7 +120,7 @@ Next we're going to explore an advanced approach to enhance the security of our
}
```
-With these functions ready, we can essentially recreate the `woographql_create_nonce` PHP function employed by WooGraphQL to create the nonce. Below is the JavaScript version:
+With these functions ready, we can essentially recreate the `woographql_create_nonce` PHP function employed by WPGraphQL for WooCommerce to create the nonce. Below is the JavaScript version:
```js
export function createNonce(action, uId, token) {
@@ -212,9 +212,9 @@ To get our checkout URL, you would run:
const checkoutUrl = generateUrl(sessionToken, clientSessionId, 'checkout');
```
-Also, `transfer-session` is the default name of the authorization endpoint. This can be altered in the WooGraphQL settings on the WP Dashboard.
+Also, `transfer-session` is the default name of the authorization endpoint. This can be altered in the WPGraphQL for WooCommerce settings on the WP Dashboard.
-To confirm the validity of your URL, compare it with the Auth URLs generated by WooGraphQL with the same `client_session_id` and ensure they are identical.
+To confirm the validity of your URL, compare it with the Auth URLs generated by WPGraphQL for WooCommerce with the same `client_session_id` and ensure they are identical.
## Conclusion
diff --git a/docs/installation.md b/docs/installation.md
index 41d2b2c5..1f53a204 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -1,5 +1,5 @@
---
-title: "WooGraphQL Installation Guide"
+title: "WPGraphQL for WooCommerce Installation Guide"
author: "Geoff Taylor"
description: "Step-by-step instructions to install and set up WooGraphQL, the WPGraphQL extension that integrates WooCommerce with GraphQL for headless e-commerce solutions."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, installation, setup, headless e-commerce"
@@ -7,7 +7,7 @@ keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, installation, setup, hea
# Installation
-This section will walk you through the process of installing and configuring WooGraphQL for your WordPress website.
+This section will walk you through the process of installing and configuring WPGraphQL for WooCommerce for your WordPress website.
## Prerequisites
@@ -16,11 +16,11 @@ This section will walk you through the process of installing and configuring Woo
## Step-by-step guide
-### 1. Download the WooGraphQL plugin
+### 1. Download the WPGraphQL for WooCommerce plugin
-Visit the official WooGraphQL website (https://woographql.com/) and download the latest release as a zip file.
+Visit the official WPGraphQL for WooCommerce website (https://woographql.com/) and download the latest release as a zip file.
-### 2. Install the WooGraphQL plugin
+### 2. Install the WPGraphQL for WooCommerce plugin
a. Log in to your WordPress admin dashboard.
b. Navigate to 'Plugins > Add New'.
@@ -28,9 +28,9 @@ c. Click on the 'Upload Plugin' button at the top of the page.
d. Click 'Choose File' and select the downloaded zip file.
e. Click 'Install Now' and wait for the installation process to complete.
-### 3. Activate the WooGraphQL plugin
+### 3. Activate the WPGraphQL for WooCommerce plugin
-After the installation is complete, click on the 'Activate Plugin' button to enable WooGraphQL on your website.
+After the installation is complete, click on the 'Activate Plugin' button to enable WPGraphQL for WooCommerce on your website.
### 4. Verify the plugin is working correctly
@@ -38,14 +38,14 @@ Visit the WPGraphQL endpoint (usually 'yourwebsite.com/graphql') and ensure that
## Next Steps
-### Configure WooCommerce and WooGraphQL settings
+### Configure WooCommerce and WPGraphQL for WooCommerce settings
-If you want to customize any WooCommerce settings related to the GraphQL schema, you can do so by visiting 'WooCommerce > Settings' in your WordPress admin dashboard. Or customize you WooGraphQL responses by visiting 'WPGraphQL > Settings' from the dashboard and selecting the 'WooGraphQL' tab. Learn about the WooGraphQL settings in-depth [here](settings.md).
+If you want to customize any WooCommerce settings related to the GraphQL schema, you can do so by visiting 'WooCommerce > Settings' in your WordPress admin dashboard. Or customize you WPGraphQL for WooCommerce responses by visiting 'WPGraphQL > Settings' from the dashboard and selecting the 'WooGraphQL' tab. Learn about the WPGraphQL for WooCommerce settings in-depth [here](settings.md).
-### Explore the WooGraphQL schema
+### Explore the WPGraphQL for WooCommerce schema
-Familiarize yourself with the available queries, mutations, and types by visiting the official WooGraphQL schema page (https://woographql.com/schema).
+Familiarize yourself with the available queries, mutations, and types by visiting the official WPGraphQL for WooCommerce schema page (https://woographql.com/schema).
-### Start using WooGraphQL in your application
+### Start using WPGraphQL for WooCommerce in your application
-You can now use WooGraphQL to build powerful applications that interact with your WooCommerce store data via GraphQL queries and mutations. This enables you to create custom storefronts, mobile apps, or third-party integrations with ease.
+You can now use WPGraphQL for WooCommerce to build powerful applications that interact with your WooCommerce store data via GraphQL queries and mutations. This enables you to create custom storefronts, mobile apps, or third-party integrations with ease.
diff --git a/docs/local-testing.md b/docs/local-testing.md
index bd642695..e3cd373a 100644
--- a/docs/local-testing.md
+++ b/docs/local-testing.md
@@ -72,7 +72,7 @@ vendor/bin/codecept run wpunit
If everything is how it should be you should get all passing tests.

-## Writing your first WooGraphQL and WPGraphQL WPUnit test
+## Writing your first WPGraphQL for WooCommerce and WPGraphQL WPUnit test
This rest of this guide walk through creating a competent WPUnit test and implemented the functionality needed to ensure that test passed. For the most part everything used here can be used when making changes to WPGraphQL as well as many of the WPGraphQL extensions created by @jasonbahl, myself and the WPGraphQL community.
@@ -86,7 +86,7 @@ The functionality we'll be adding in the coming steps will be to add the **Integ
### Generating a WPUnit test file
-The PHP testing suite used by WPGraphQL and WooGraphQL is Codeception, but they don't manage the `codeception/codeception` in **Composer**. That is done by the `lucatume/wp-browser` package. This package, developed and maintained by *[theAverageDev](http://theaveragedev.com/)* [Luca Tumedei](https://github.com/lucatume), **[wp-browser](https://wpbrowser.wptestkit.dev/)** is a suite of Codeception modules that provide tools designed specifically for testing WordPress sites, themes, and plugins on multiple levels. The `lucatume/wp-browser` package functions as a one-stop shop managing Codeception and all it's dependencies for WPGraphQL and many of it's extensions.
+The PHP testing suite used by WPGraphQL and WPGraphQL for WooCommerce is Codeception, but they don't manage the `codeception/codeception` in **Composer**. That is done by the `lucatume/wp-browser` package. This package, developed and maintained by *[theAverageDev](http://theaveragedev.com/)* [Luca Tumedei](https://github.com/lucatume), **[wp-browser](https://wpbrowser.wptestkit.dev/)** is a suite of Codeception modules that provide tools designed specifically for testing WordPress sites, themes, and plugins on multiple levels. The `lucatume/wp-browser` package functions as a one-stop shop managing Codeception and all it's dependencies for WPGraphQL and many of it's extensions.
So having done everything above, and finally being ready for development, begin by generating the **ItemCountTest** test file with Codeception `generate` command. Run the following in your terminal from the project root directory
@@ -157,7 +157,7 @@ class ItemCountTest extends WooGraphQLTestCase {
}
```
-Here we'll be utilizing a `WooGraphQLTestCase` bundled in the WooGraphQL test environment. It extends the WPGraphQLTestCase class provided by the [**WPGraphQL TestCase**](https://github.com/wp-graphql/wp-graphql-testcase) library. Which was designed specifically for testing WPGraphQL responses.
+Here we'll be utilizing a `WooGraphQLTestCase` bundled in the WPGraphQL for WooCommerce test environment. It extends the WPGraphQLTestCase class provided by the [**WPGraphQL TestCase**](https://github.com/wp-graphql/wp-graphql-testcase) library. Which was designed specifically for testing WPGraphQL responses.
### Writing our test
@@ -207,7 +207,7 @@ Which shouldn't be surprising, in the next section we'll be taking this query an
>}
>```
-#### WooGraphQL Codeception Factories
+#### WPGraphQL for WooCommerce Codeception Factories
WooCommerce is a vast WordPress plugin with a lot moving parts and getting them all to play nice can be a daunting task. To address this the **WooGraphQLTestCase** class provides a number of factories for creating just the right scenario for testing our queries. In this guide you'll be expose to the `cart` and `product` factories, but there are quite a few. However documentation on them is pretty non-existant at the time of creation for this guide. Until this is rectified, it's recommended that you view factory [files](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/develop/tests/_support/Factory) directly to get a general idea of what they are and their capabilities.
@@ -399,7 +399,7 @@ Running the test will result in the error above. **Cannot query field "itemCount
### Adding the `itemCount` field to the GraphQL schema
-Before when jump into the code, lets discuss how WPGraphQL and WooGraphQL process requests.
+Before when jump into the code, lets discuss how WPGraphQL and WPGraphQL for WooCommerce process requests.
#### How WPGraphQL works
@@ -407,9 +407,9 @@ When a request is made to Wordpress, during the `after_setup_theme` action **WPG
If the request is a GraphQL request, a [`Request`](https://github.com/wp-graphql/wp-graphql/blob/develop/src/Request.php) class instance is created. It's job is to load the schema and process the request.
The first part of loading the schema and our focal point for purpose is the initialization of the [`TypeRegistry`](https://github.com/wp-graphql/wp-graphql/blob/develop/src/Registry/TypeRegistry.php) and specific the execution of [`graphql_register_types`](https://github.com/wp-graphql/wp-graphql/blob/develop/src/Registry/TypeRegistry.php#L397) action. This hook serves the purpose of providing a location to register types not defined by **WPGraphQL**.
-#### How WooGraphQL works
+#### How WPGraphQL for WooCommerce works
-WooGraphQL uses `graphql_register_types` to register WooCommerce specific types.
+WPGraphQL for WooCommerce uses `graphql_register_types` to register WooCommerce specific types.
If you're familiar WordPress, you're most like familiar with Custom Post-types _(CPTs)_ the core data object used by WordPress. If you're not too familiar with WooCommerce, _(or even if you are)_, you maybe wondering why the CPTs in WooCommerce have such a different schema shape the CPTs defined by **WPGraphQL**. This due to the fact the WooCommerce wraps it's CPT objects, _(WP_Post)_, in data stores objects. This data stores provide decorator functionality that is widely used by WooCommerce extension. **WooGraphQL** uses data stores as the source for it CPT schema shapes. All other types like the **cart** and **shipping zones** are sourced by custom data objects saved in custom databases, and accessed using WooCommerce built-in functionality.
#### Implementing our changes
diff --git a/docs/routing-by-uri.md b/docs/routing-by-uri.md
index 32518682..50a4fd27 100644
--- a/docs/routing-by-uri.md
+++ b/docs/routing-by-uri.md
@@ -1,6 +1,6 @@
---
title: "Routing by URI with WooGraphQL"
-description: "Discover how to implement routing by URI in your headless WooCommerce application using WooGraphQL and WPGraphQL for efficient and user-friendly navigation."
+description: "Discover how to implement routing by URI in your headless WooCommerce application using WPGraphQL for WooCommerce and WPGraphQL for efficient and user-friendly navigation."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, routing, URI, headless, navigation"
author: "Geoff Taylor"
---
@@ -13,7 +13,7 @@ In this section, we will create a simple app that demonstrates routing with WPGr
- Basic knowledge of React and React Router.
- Familiarity with GraphQL and WPGraphQL.
-- A setup WPGraphQL/WooGraphQL backend.
+- A setup WPGraphQL/WPGraphQL for WooCommerce backend.
## Getting Started
diff --git a/docs/settings.md b/docs/settings.md
index 84bab0c6..d8aca857 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -1,19 +1,19 @@
---
-title: "WooGraphQL Settings Guide"
-description: "Learn how to configure and manage WooGraphQL settings to optimize the integration of WooCommerce with WPGraphQL for your headless e-commerce solution."
+title: "WPGraphQL for WooCommerce Settings Guide"
+description: "Learn how to configure and manage WPGraphQL for WooCommerce settings to optimize the integration of WooCommerce with WPGraphQL for your headless e-commerce solution."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, settings, configuration, headless e-commerce"
author: "Geoff Taylor"
---
-# WooGraphQL Settings
+# WPGraphQL for WooCommerce Settings
-The WooGraphQL settings tab on the WPGraphQL settings page provides several options to customize the behavior of the WooGraphQL plugin. Below is a detailed breakdown of each setting.
+The WPGraphQL for WooCommerce settings tab on the WPGraphQL settings page provides several options to customize the behavior of the WPGraphQL for WooCommerce plugin. Below is a detailed breakdown of each setting.
-
+
## Disable QL Session Handler
-WooGraphQL comes with a custom WooCommerce User Session Handler called QL Session Handler, which extends the default WooCommerce session handler. The QL Session Handler uses JSON Web Tokens (JWT) instead of HTTP cookies for session identification. This setting allows you to disable the QL Session Handler and revert to the default WooCommerce session handler that uses HTTP cookies.
+WPGraphQL for WooCommerce comes with a custom WooCommerce User Session Handler called QL Session Handler, which extends the default WooCommerce session handler. The QL Session Handler uses JSON Web Tokens (JWT) instead of HTTP cookies for session identification. This setting allows you to disable the QL Session Handler and revert to the default WooCommerce session handler that uses HTTP cookies.

@@ -23,7 +23,7 @@ The default WooCommerce User Session Handler is responsible for capturing cart a
## Enable Unsupported types
-The settings is simple to understand and likely to be enabled if you're using a WC extension that uses a product type that isn't support by WooGraphQL out-of-box. When enabled it will substitute the missing type with the SimpleProduct type. This way you can still use the product type and possibly pull what extra data you need from the `Product`'s `metaData` field.
+The settings is simple to understand and likely to be enabled if you're using a WC extension that uses a product type that isn't support by WPGraphQL for WooCommerce out-of-box. When enabled it will substitute the missing type with the SimpleProduct type. This way you can still use the product type and possibly pull what extra data you need from the `Product`'s `metaData` field.

diff --git a/docs/testing-w-docker.md b/docs/testing-w-docker.md
index b0de5223..1c9cf1d4 100644
--- a/docs/testing-w-docker.md
+++ b/docs/testing-w-docker.md
@@ -1,7 +1,7 @@
---
title: "Testing w/ Docker"
author: "Geoff Taylor"
-description: "An extensive guide on testing w/ WooGraphQL + Docker."
+description: "An extensive guide on testing w/ WPGraphQL for WooCommerce + Docker."
keywords: ""
---
diff --git a/docs/using-cart-data.md b/docs/using-cart-data.md
index 11d610b0..c269f356 100644
--- a/docs/using-cart-data.md
+++ b/docs/using-cart-data.md
@@ -1,6 +1,6 @@
---
title: "Using Cart Data with WooGraphQL"
-description: "Learn how to retrieve and utilize cart data in your headless WooCommerce application with WooGraphQL and WPGraphQL, enabling seamless shopping experiences for your customers."
+description: "Learn how to retrieve and utilize cart data in your headless WooCommerce application with WPGraphQL for WooCommerce and WPGraphQL, enabling seamless shopping experiences for your customers."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, cart data, headless, shopping experience"
author: "Geoff Taylor"
---
@@ -13,7 +13,7 @@ In this section, we will create a "/cart" page that displays a table of the item
- Basic knowledge of React and React Router.
- Familiarity with GraphQL and WPGraphQL.
-- A setup WPGraphQL/WooGraphQL backend.
+- A setup WPGraphQL/WPGraphQL for WooCommerce backend.
- Read previous sections on [Routing By URI](routing-by-uri.md), [Using Product Data](using-product-data.md), and [Handling User Session and Using Cart Mutations](handing-user-session-and-using-cart-mutations).
## Step 0: Create `graphql.js` file
diff --git a/docs/using-checkout-mutation-and-order-mutations.md b/docs/using-checkout-mutation-and-order-mutations.md
index 63bdbc29..6478ce20 100644
--- a/docs/using-checkout-mutation-and-order-mutations.md
+++ b/docs/using-checkout-mutation-and-order-mutations.md
@@ -15,7 +15,7 @@ On the other hand, the `createOrder` mutation allows us to bypass WooCommerce's
In this section, we will provide detailed examples and code snippets to demonstrate how these mutations can be used in a real-world application. We will also discuss potential use cases and best practices for using these mutations.
-Before proceeding, it is recommended that you have a good understanding of the basics of WooGraphQL and have gone through the previous sections of this documentation. This will ensure that you have the necessary background knowledge to fully understand the concepts and examples presented in this section.
+Before proceeding, it is recommended that you have a good understanding of the basics of WPGraphQL for WooCommerce and have gone through the previous sections of this documentation. This will ensure that you have the necessary background knowledge to fully understand the concepts and examples presented in this section.
Let's get started!
diff --git a/docs/using-composite-product-data-and-mutations.md b/docs/using-composite-product-data-and-mutations.md
index 47e90de6..7006c321 100644
--- a/docs/using-composite-product-data-and-mutations.md
+++ b/docs/using-composite-product-data-and-mutations.md
@@ -1,6 +1,6 @@
---
title: "Using Composite Product Data + Mutations with WooGraphQL"
-description: "Learn how to use the Composite Product functionality with WooGraphQL by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
+description: "Learn how to use the Composite Product functionality with WPGraphQL for WooCommerce by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, Composite Product functionality, Product Data, Session Provider, Cart Mutations"
author: "Geoff Taylor"
---
diff --git a/docs/using-customer-data-and-mutations.md b/docs/using-customer-data-and-mutations.md
index a4729fe6..27f1579a 100644
--- a/docs/using-customer-data-and-mutations.md
+++ b/docs/using-customer-data-and-mutations.md
@@ -7,7 +7,7 @@ author: "Geoff Taylor"
# Using Customer Data + Mutations
-This section of the documentation will guide you through the process of creating a clone of WooCommerce's user account pages using React.js and the WooGraphQL API. This demonstration will provide a comprehensive understanding of how to use the `customer` query and `updateCustomer` mutation.
+This section of the documentation will guide you through the process of creating a clone of WooCommerce's user account pages using React.js and the WPGraphQL for WooCommerce API. This demonstration will provide a comprehensive understanding of how to use the `customer` query and `updateCustomer` mutation.
Before proceeding, it is assumed that you have already gone through and studied the code samples of the following documentation:
- [Handling User Session and Using Cart Mutations](handling-user-session-and-using-cart-mutations.md)
@@ -422,6 +422,6 @@ You'll note these samples also don't take into account React server components.
## Conclusion
-In this section, we've seen how to use the WooGraphQL API to create a clone of WooCommerce's user account pages. We've used the `customer` query to fetch the user's details, the `orders` field on the `customer` type to fetch the user's orders, and the `updateCustomer` mutation to update the user's details and addresses. We've also seen how to handle user authentication with the `login` mutation and how to log out the user. It should be noted that this was all made possible by proper usage our `SessionProvider`.
+In this section, we've seen how to use the WPGraphQL for WooCommerce API to create a clone of WooCommerce's user account pages. We've used the `customer` query to fetch the user's details, the `orders` field on the `customer` type to fetch the user's orders, and the `updateCustomer` mutation to update the user's details and addresses. We've also seen how to handle user authentication with the `login` mutation and how to log out the user. It should be noted that this was all made possible by proper usage our `SessionProvider`.
With the completion of this section and all proceeding sections, you have been given an deep dive into the basic and intermediate usages of WooGraphQL. The following sections will be on WooGraphQL Pro functionality.
diff --git a/docs/using-order-data.md b/docs/using-order-data.md
index 24300fa9..9da1e90c 100644
--- a/docs/using-order-data.md
+++ b/docs/using-order-data.md
@@ -130,7 +130,7 @@ For more information on WordPress Application Passwords, refer to the [official
## Conclusion
-Well done! You've successfully navigated through the process of using order data in a WooGraphQL context. We've explored how to build a basic order status page in React.js, which takes an email address and returns a list of all the orders associated with that email. We've also discussed the recommended method of retrieving and utilizing order data, which involves using a serverless function like a Next API route.
+Well done! You've successfully navigated through the process of using order data in a WPGraphQL for WooCommerce context. We've explored how to build a basic order status page in React.js, which takes an email address and returns a list of all the orders associated with that email. We've also discussed the recommended method of retrieving and utilizing order data, which involves using a serverless function like a Next API route.
Remember, while the method we initially demonstrated works, it's not the most secure or efficient way to handle order data. We recommend using a serverless function with admin access, provided by a WordPress Application Password, to query for the orders. This method is more secure and efficient, and it allows for greater flexibility and control over the data.
diff --git a/docs/using-product-addons-data-and-mutations.md b/docs/using-product-addons-data-and-mutations.md
index 02dc9d25..e93832a9 100644
--- a/docs/using-product-addons-data-and-mutations.md
+++ b/docs/using-product-addons-data-and-mutations.md
@@ -1,7 +1,7 @@
---
title: "Using Product Add-ons Data + Mutations with WooGraphQL"
author: "Geoff Taylor"
-description: "Learn how to use the Product Add-on functionality with WooGraphQL by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
+description: "Learn how to use the Product Add-on functionality with WPGraphQL for WooCommerce by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, Product Add-on functionality, Product Data, Session Provider, Cart Mutations"
---
diff --git a/docs/using-product-bundle-data-and-mutations.md b/docs/using-product-bundle-data-and-mutations.md
index d385653f..9b004b30 100644
--- a/docs/using-product-bundle-data-and-mutations.md
+++ b/docs/using-product-bundle-data-and-mutations.md
@@ -1,6 +1,6 @@
---
title: "Using Product Bundle Data + Mutations with WooGraphQL"
-description: "Learn how to use the Product Bundle functionality with WooGraphQL by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
+description: "Learn how to use the Product Bundle functionality with WPGraphQL for WooCommerce by building upon the code from `Using Product Data` and `Creating Session Provider and using Cart Mutations`."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, Product Bundle functionality, Product Data, Session Provider, Cart Mutations"
author: "Geoff Taylor"
---
@@ -9,7 +9,7 @@ author: "Geoff Taylor"
In the previous sections, we have explored various aspects of using WooGraphQL, from handling user sessions and cart mutations to working with different product types. Now, we are going to delve into the world of product bundles. Product bundles are a powerful feature in WooCommerce that allows merchants to sell multiple products together as a set, often at a discounted price. This can be a great way to increase average order value and move more inventory.
-In this section, we will demonstrate how to use the WooGraphQL API to work with product bundle data and mutations. We will build upon the code from the previous sections, specifically the ones on "Using Product Data" and "Creating Session Provider and using Cart Mutations". This will involve fetching product bundle data, adding product bundles to the cart, and handling the unique specifications of product bundles.
+In this section, we will demonstrate how to use the WPGraphQL for WooCommerce API to work with product bundle data and mutations. We will build upon the code from the previous sections, specifically the ones on "Using Product Data" and "Creating Session Provider and using Cart Mutations". This will involve fetching product bundle data, adding product bundles to the cart, and handling the unique specifications of product bundles.
We will be using the `BundleProduct` component and updating the `SingleProduct` and `useCartMutations` components to handle product bundles. We will be using the code samples from the [Using Product Data](https://woographql.com/docs/using-product-data) and [Handling User Session and Using Cart Mutations](https://woographql.com/docs/handling-user-session-and-using-cart-mutations) as a starting point.
@@ -90,7 +90,7 @@ Now we have updated the `SingleProduct` and `useCartMutations` components to han
## Conclusion
-Congratulations! You have now learned how to work with product bundle data and mutations using the WooGraphQL API. This includes fetching product bundle data, adding product bundles to the cart, and handling the unique specifications of product bundles.
+Congratulations! You have now learned how to work with product bundle data and mutations using the WPGraphQL for WooCommerce API. This includes fetching product bundle data, adding product bundles to the cart, and handling the unique specifications of product bundles.
Remember, while product bundles are similar to other product types in many ways, they have unique specifications that require special handling. Therefore, it's important to understand these differences and how to work with them when building your headless WooCommerce application.
diff --git a/docs/using-product-data.md b/docs/using-product-data.md
index 66220994..9dcf1184 100644
--- a/docs/using-product-data.md
+++ b/docs/using-product-data.md
@@ -1,6 +1,6 @@
---
title: "Using Product Data with WooGraphQL"
-description: "Learn how to efficiently fetch and use product data in your headless WooCommerce application using WooGraphQL and WPGraphQL for a seamless shopping experience."
+description: "Learn how to efficiently fetch and use product data in your headless WooCommerce application using WPGraphQL for WooCommerce and WPGraphQL for a seamless shopping experience."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, product data, headless, shopping experience"
author: "Geoff Taylor"
---
@@ -13,7 +13,7 @@ In this section, we will implement the Single Product page using the provided Gr
- Basic knowledge of React and React Router.
- Familiarity with GraphQL and WPGraphQL.
-- A setup WPGraphQL/WooGraphQL backend.
+- A setup WPGraphQL/WPGraphQL for WooCommerce backend.
- Read previous sections on [Routing By URI](routing-by-uri.md)
## Step 0: Create our `graphql.js` file.
diff --git a/docs/using-subscription-data-and-mutations.md b/docs/using-subscription-data-and-mutations.md
index 2d1a2ccd..9907cbca 100644
--- a/docs/using-subscription-data-and-mutations.md
+++ b/docs/using-subscription-data-and-mutations.md
@@ -9,7 +9,7 @@ author: "Geoff Taylor"
This section of the documentation will focus on how to use the Subscription functionality provided by WooGraphQL Pro. We will build upon the code written in `Using Product Data` and `Routing by URI` by rewriting the `ProductListing` and `SingleProduct` components to support `SubscriptionProduct` types.
-Before we start, ensure that the `changeSubPaymentMethodUrl`, `renewSubPaymentMethodUrl`, and `Enable Subscriptions` options from the WooGraphQL settings page are checked and enabled. These settings will allow us to handle subscription renewals, payment method changes, and enable subscription functionality respectively.
+Before we start, ensure that the `changeSubPaymentMethodUrl`, `renewSubPaymentMethodUrl`, and `Enable Subscriptions` options from the WPGraphQL for WooCommerce settings page are checked and enabled. These settings will allow us to handle subscription renewals, payment method changes, and enable subscription functionality respectively.
## Understanding SubscriptionProduct Type
@@ -125,7 +125,7 @@ function SubscriptionsPage({ customer }) {
In the `SubscriptionsPage` component, we have added `renew`, `change payment method`, `reactivate`, and `cancel` buttons. The `renew` and `change payment method` buttons use the `changeSubPaymentMethodUrl` and `renewSubPaymentMethodUrl` fields respectively. The `reactivate` and `cancel` buttons use the `reactivateSubscription` and `cancelSubscription` mutations respectively. The visibility of these buttons is controlled based on the status of the subscription.
-To learn more about the `changeSubPaymentMethodUrl` and `renewSubPaymentMethodUrl` URLs, please refer to the [Harmonizing with WordPress](https://woographql.com/docs/harmonizing-with-wordpress#harmonizing-with-wordpress) section of the WooGraphQL documentation.
+To learn more about the `changeSubPaymentMethodUrl` and `renewSubPaymentMethodUrl` URLs, please refer to the [Harmonizing with WordPress](https://woographql.com/docs/harmonizing-with-wordpress#harmonizing-with-wordpress) section of the WPGraphQL for WooCommerce documentation.
## Conclusion
diff --git a/includes/class-admin.php b/includes/class-admin.php
index 55cd5bbe..5cd54877 100644
--- a/includes/class-admin.php
+++ b/includes/class-admin.php
@@ -23,7 +23,7 @@ public function __construct() {
}
/**
- * Registers the WooGraphQL Settings tab.
+ * Registers the WPGraphQL for WooCommerce Settings tab.
*
* @param \WPGraphQL\Admin\Settings\Settings $manager Settings Manager.
* @return void
@@ -31,7 +31,7 @@ public function __construct() {
public function register_settings( Settings $manager ) {
$manager->settings_api->register_section(
'woographql_settings',
- [ 'title' => __( 'WooGraphQL', 'wp-graphql-woocommerce' ) ]
+ [ 'title' => __( 'WooCommerce', 'wp-graphql-woocommerce' ) ]
);
$manager->settings_api->register_fields(
diff --git a/includes/class-core-schema-filters.php b/includes/class-core-schema-filters.php
index c2ec76ef..788f1700 100644
--- a/includes/class-core-schema-filters.php
+++ b/includes/class-core-schema-filters.php
@@ -144,7 +144,7 @@ public static function register_post_types( $args, $post_type ) {
throw new UserError(
sprintf(
/* translators: %s: Product type */
- __( 'The "%s" product type is not supported by the core WPGraphQL WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
+ __( 'The "%s" product type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
$value->type
)
);
@@ -384,7 +384,7 @@ public static function inject_type_resolver( $type, $value ) {
throw new UserError(
sprintf(
/* translators: %s: Product type */
- __( 'The "%s" product type is not supported by the core WPGraphQL WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
+ __( 'The "%s" product type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
$value->type
)
);
@@ -419,7 +419,7 @@ public static function resolve_product_type( $value ) {
throw new UserError(
sprintf(
/* translators: %s: Product type */
- __( 'The "%s" product type is not supported by the core WPGraphQL WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
+ __( 'The "%s" product type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
$value->type
)
);
@@ -446,7 +446,7 @@ public static function resolve_product_variation_type( $value ) {
throw new UserError(
sprintf(
/* translators: %s: Product type */
- __( 'The "%s" product variation type is not supported by the core WPGraphQL WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
+ __( 'The "%s" product variation type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
$value->type
)
);
diff --git a/includes/class-jwt-auth-schema-filters.php b/includes/class-jwt-auth-schema-filters.php
index f6389e81..763be8a9 100644
--- a/includes/class-jwt-auth-schema-filters.php
+++ b/includes/class-jwt-auth-schema-filters.php
@@ -1,6 +1,6 @@
%s' .
'',
esc_html__(
- 'WooGraphQL appears to have been installed without it\'s dependencies. It will not work properly until dependencies are installed. This likely means you have cloned WPGraphQL from Github and need to run the command `composer install`.',
+ 'WPGraphQL for WooCommerce appears to have been installed without it\'s dependencies. It will not work properly until dependencies are installed. This likely means you have cloned WPGraphQL from Github and need to run the command `composer install`.',
'wp-graphql-woocommerce'
)
);
@@ -463,15 +463,15 @@ public static function load_auth_router() {
}
/**
- * Sets up WooGraphQL schema.
+ * Sets up WPGraphQL for WooCommerce schema.
*
* @return void
*/
private function setup() {
- // Initialize WooGraphQL Settings.
+ // Initialize WPGraphQL for WooCommerce Settings.
new Admin();
- // Initialize WooGraphQL DB hooks.
+ // Initialize WPGraphQL for WooCommerce DB hooks.
new Data\DB_Hooks();
// Setup minor integrations.
@@ -489,7 +489,7 @@ private function setup() {
// Register WPGraphQL JWT Authentication filters.
JWT_Auth_Schema_Filters::add_filters();
- // Initialize WooGraphQL TypeRegistry.
+ // Initialize WPGraphQL for WooCommerce TypeRegistry.
$registry = new Type_Registry();
add_action( 'graphql_register_types', [ $registry, 'init' ] );
}
diff --git a/includes/data/class-factory.php b/includes/data/class-factory.php
index 8395a52b..bcfd20ca 100644
--- a/includes/data/class-factory.php
+++ b/includes/data/class-factory.php
@@ -172,7 +172,7 @@ public static function resolve_downloadable_item( $id, AppContext $context ) {
}
/**
- * Resolves Relay node for some WooGraphQL types.
+ * Resolves Relay node for some WPGraphQL for WooCommerce types.
*
* @param mixed $node Node object.
* @param int $id Object unique ID.
@@ -205,7 +205,7 @@ public static function resolve_node( $node, $id, $type, $context ) {
}
/**
- * Resolves Relay node type for some WooGraphQL types.
+ * Resolves Relay node type for some WPGraphQL for WooCommerce types.
*
* @param string|null $type Node type.
* @param mixed $node Node object.
diff --git a/includes/type/interface/class-payment-token.php b/includes/type/interface/class-payment-token.php
index f7ed1eba..ca35e1be 100644
--- a/includes/type/interface/class-payment-token.php
+++ b/includes/type/interface/class-payment-token.php
@@ -39,7 +39,7 @@ public static function register_interface() {
throw new UserError(
sprintf(
/* translators: %s: Payment token type */
- __( 'The "%s" token type is not supported by the core WPGraphQL WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
+ __( 'The "%s" token type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
$type
)
);
diff --git a/tests/_envs/docker.yml b/tests/_envs/docker.yml
index fabbd8cd..5b9d5550 100644
--- a/tests/_envs/docker.yml
+++ b/tests/_envs/docker.yml
@@ -38,7 +38,7 @@ modules:
tablePrefix: wp_
domain: '%WORDPRESS_DOMAIN%'
adminEmail: 'admin@example.com'
- title: 'WooGraphQL Tests'
+ title: 'WPGraphQL for WooCommerce Tests'
plugins:
- woocommerce/woocommerce.php
- woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
diff --git a/wp-graphql-woocommerce.php b/wp-graphql-woocommerce.php
index 4685e894..1cfc77c7 100644
--- a/wp-graphql-woocommerce.php
+++ b/wp-graphql-woocommerce.php
@@ -1,8 +1,8 @@