{"id":13466765,"url":"https://github.com/wp-graphql/wp-graphql-woocommerce","last_synced_at":"2025-05-14T04:09:42.740Z","repository":{"id":38360111,"uuid":"175459051","full_name":"wp-graphql/wp-graphql-woocommerce","owner":"wp-graphql","description":"Add WooCommerce support and functionality to your WPGraphQL server","archived":false,"fork":false,"pushed_at":"2025-05-01T18:46:55.000Z","size":6111,"stargazers_count":664,"open_issues_count":81,"forks_count":137,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2025-05-11T10:52:38.640Z","etag":null,"topics":["api","graphql","graphql-server","hacktoberfest","mutations","woocommerce","wordpress-plugin","wp-graphql","wp-graphql-woocommerce","wp-plugin"],"latest_commit_sha":null,"homepage":"https://woographql.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-graphql.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["kidunot89"]}},"created_at":"2019-03-13T16:29:50.000Z","updated_at":"2025-05-05T07:51:10.000Z","dependencies_parsed_at":"2023-12-30T03:06:34.815Z","dependency_job_id":"77ce8e84-819f-415d-95a8-183640abb03e","html_url":"https://github.com/wp-graphql/wp-graphql-woocommerce","commit_stats":{"total_commits":962,"total_committers":46,"mean_commits":20.91304347826087,"dds":"0.11226611226611227","last_synced_commit":"74099a099e045395120d7e02592c04d00e1296c5"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-graphql%2Fwp-graphql-woocommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-graphql%2Fwp-graphql-woocommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-graphql%2Fwp-graphql-woocommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-graphql%2Fwp-graphql-woocommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-graphql","download_url":"https://codeload.github.com/wp-graphql/wp-graphql-woocommerce/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253871995,"owners_count":21976786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","graphql","graphql-server","hacktoberfest","mutations","woocommerce","wordpress-plugin","wp-graphql","wp-graphql-woocommerce","wp-plugin"],"created_at":"2024-07-31T15:00:49.796Z","updated_at":"2025-05-14T04:09:42.698Z","avatar_url":"https://github.com/wp-graphql.png","language":"PHP","funding_links":["https://github.com/sponsors/kidunot89","https://opencollective.com/woographql","http://opencollective.com/wp-graphql","https://opencollective.com/webonyx-graphql-php","https://opencollective.com/woographql/contribute","https://opencollective.com/woographql/organization/0/website","https://opencollective.com/woographql/organization/1/website","https://opencollective.com/woographql/organization/2/website","https://opencollective.com/woographql/organization/3/website","https://opencollective.com/woographql/organization/4/website","https://opencollective.com/woographql/organization/5/website","https://opencollective.com/woographql/organization/6/website","https://opencollective.com/woographql/organization/7/website","https://opencollective.com/woographql/organization/8/website","https://opencollective.com/woographql/organization/9/website"],"categories":["Plugins \u0026 Tools","Plugins"],"sub_categories":["WordPress"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" width=\"200px\" alt=\"WPGraphQL for WooCommerce (WooGraphQL) Logo\" /\u003e\n\u003c/p\u003e\n\n# WPGraphQL for WooCommerce\n\n\u003ca href=\"https://woographql.com\" target=\"_blank\"\u003eWebsite\u003c/a\u003e • \u003ca href=\"https://woographql.com/docs\" target=\"_blank\"\u003eDocs\u003c/a\u003e • \u003ca href=\"https://woographql.com/schema\" target=\"_blank\"\u003eSchema\u003c/a\u003e • \u003ca href=\"https://woographql.com/playground\" target=\"_blank\"\u003ePlayground\u003c/a\u003e • \u003ca href=\"https://woographql.com/about\" target=\"_blank\"\u003eAbout\u003c/a\u003e • \u003ca href=\"https://join.slack.com/t/wp-graphql/shared_invite/zt-3vloo60z-PpJV2PFIwEathWDOxCTTLA\" target=\"_blank\"\u003eJoin Slack\u003c/a\u003e\n\n[![Automated-Testing](https://github.com/wp-graphql/wp-graphql-woocommerce/workflows/Automated-Testing/badge.svg?branch=develop)](https://github.com/wp-graphql/wp-graphql-woocommerce/actions?query=workflow%3A%22Automated-Testing%22) [![Coding Standards](https://github.com/wp-graphql/wp-graphql-woocommerce/actions/workflows/lint-code.yml/badge.svg)](https://github.com/wp-graphql/wp-graphql-woocommerce/actions/workflows/lint-code.yml) [![Coverage Status](https://coveralls.io/repos/github/wp-graphql/wp-graphql-woocommerce/badge.svg?branch=develop)](https://coveralls.io/github/wp-graphql/wp-graphql-woocommerce?branch=develop) [![Financial Contributors on Open Collective](https://opencollective.com/woographql/all/badge.svg?label=financial+contributors)](https://opencollective.com/woographql)\n\n## Install\n\n### Installing Manually\n\n1. Install and activate [WPGraphQL](https://wpgraphql.com/) and [WooCommerce](https://woocommerce.com/).\n2. Download the `wp-graphql-woocommerce.zip` file from the Assets section of the most stable [release](https://github.com/wp-graphql/wp-graphql-woocommerce/releases) and activate the plugin in your WordPress directory.\n3. Set your GraphQL client endpoint to your site's GraphQL endpoint. Typically, this is `your-store.domain/graphql`.\n\n### Installing with Composer\n\n**This method is recommended for users with unique installations like WP Bedrock or SpinupWP.**\n\n1. Install [WordPress](https://composer.rarst.net/) and [WooCommerce](https://wpackagist.org/search?q=woocommerce\u0026type=plugin\u0026search=).\n2. Install WPGraphQL and WPGraphQL for WooCommerce by running `composer require wp-graphql/wp-graphql wp-graphql/wp-graphql-woocommerce`.\n3. 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`.\n\n### Optional Extras\n\n- Install \u0026 activate [WPGraphQL-JWT-Authentication](https://github.com/wp-graphql/wp-graphql-jwt-authentication) to introduce a `login` mutation that returns a JSON Web Token.\n- Install \u0026 activate [WPGraphQL Headless Login](https://github.com/AxeWP/wp-graphql-headless-login) to introduce a `login` mutation with OAuth2 client support. **Shouldn't be used with WPGraphQL-JWT-Authentication**\n- Install \u0026 activate [WPGraphQL-CORS](https://github.com/funkhaus/wp-graphql-cors) for enhanced security via HTTP CORS and to utilize some advanced WPGraphQL features.\n\n## What Can You Do with This Extension?\n\n- Query your shop's products and variations with detailed filtering options.\n- Query customers, orders, coupons, and refunds. Note: Operations have user restrictions.\n- Manage customer sessions using JWTs, and use cart/customer queries and mutations. Note: Operations have user restrictions.\n- Manually create orders, automate order creation with the checkout mutation, or delegate a customer's session to the WooCommerce checkout page in your theme for comprehensive payment gateway support.\n\n(*) These operations have user restrictions. Learn how to utilize them correctly at the resources listed below:\n\n- [Authentication and Authorization](https://www.wpgraphql.com/docs/authentication-and-authorization/)\n- [Configuring a GraphQL Client for WooCommerce User Session Management](https://woographql.com/docs/configuring-graphql-client-for-user-session)\n- [Handling User Authentication](https://woographql.com/docs/handling-user-authentication)\n- [Handling User Session and Using Cart Mutations](https://woographql.com/docs/handling-user-session-and-using-cart-mutations)\n- [Using Checkout Mutation and Order Mutations](https://woographql.com/docs/using-checkout-mutation-and-order-mutations)\n- [Using Order Data](https://woographql.com/docs/using-order-data)\n\n(#) The recommended method to checkout, taking full advantage of WooCommerce's payment gateways for payment process and other checkout-related extenstions, is to pass the session back to the WordPress installation and let WooCommerce take over from the tradition checkout page. Learn more about this approach below.\n\n- [Harmonizing with WordPress](https://woographql.com/docs/harmonizing-with-wordpress)\n- [Hosted WooCommerce Checkout for a Headless Application](https://jacobarriola.com/post/hosted-woocommerce-checkout-headless-application)\n\nAlternatively, you can create a custom checkout form and process payments externally. Here is some resources for that as well.\n\n- [Headless WooCommerce Checkout with Gatsby and Stripe](https://jacobarriola.com/post/headless-woocommerce-stripe-checkout-graphql#step-5-load-the-checkoutform-component-in-your-checkout-page)\n\n## Why Don't WooCommerce CPT GraphQL Types Support All the Features WPGraphQL Exposes for Most WordPress CPTs?\n\nWooCommerce's Custom Post Types (CPTs) and most data objects are managed by a data store system. This system allows for flexible data object definitions. While objects like **products**, **orders**, and **coupons** are defined as WordPress CPTs by default, they don't have to be.\n\nThis 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.\n\nThe 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.\n\nSuch 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.\n\nThank you for your patience :smile:\n[@kidunot89](https://github.com/kidunot89)\n\n## Future Features\n\n- Product CRUD mutations.\n- And some other stuff I'm sure :thinking:\n\n## For WooCommerce Extensions Support\n\n**[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.\n\nThe following WooCommerce extensions are supported by WooGraphQL Pro:\n\n- WooCommerce Subscriptions\n- WooCommerce Product Bundles\n- WooCommerce Product Add-Ons\n- WooCommerce Composite Products\n\n### Installing Supported WooCommerce Extensions (Optional)\n\nIf you wish to use any of the supported WooCommerce extensions with WooGraphQL Pro, follow these steps:\n\n1. Purchase your desired extensions from the WooCommerce marketplace. The supported extensions are listed above.\n2. Download the `.zip` file(s) for your purchased extension(s) from your WooCommerce account.\n3. In your WordPress Admin Dashboard, navigate to Plugins \u003e Add New \u003e Upload Plugin, and upload the downloaded `.zip` file(s).\n4. Once the upload is complete, click on 'Activate Plugin' to activate the extension(s).\n\n### Installing and Activating WooGraphQL Pro\n\nTo install and activate **WooGraphQL Pro**, follow these steps:\n\n1. Purchase WooGraphQL Pro from our official [website](https://woographql.com/pro).\n2. After purchase you should find yourself on your account dashboard. Go to the `Licenses` page and generate and new license and copy it for later.\n3. Next go to the `Downloads` page and download the latest version of WooGraphQL Pro.\n4. Go to your WordPress Admin Dashboard, navigate to Plugins \u003e Add New \u003e Upload Plugin, and upload the `woographql-pro.zip` file you downloaded.\n5. After uploading, click 'Activate Plugin' to activate WooGraphQL Pro.\n\n### Enabling Schema Support for Installed Extensions\n\nTo enable schema support for your installed extensions, follow these steps:\n\n1. Navigate to the WPGraphQL settings page on your WordPress Admin Dashboard.\n2. Click on the 'WooGraphQL' tab.\n3. 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.\n\nNote: 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.\n\nWith WooGraphQL Pro and your chosen extensions now installed, you're ready to build more sophisticated, feature-rich eCommerce solutions with WordPress and WooCommerce.\n\n## Development Tools\n\n### Playground\n\nFeel free to test out the extension using this [GraphiQL Playground](https://woographql.com/playground). The playground allows you to execute queries and mutations, as well as view the schema (*).\n\n(*) I have a tendency to forget to update the playground between releases :sweat_smile:, so if you believe this to be the case look me up somewhere on this page and lemme know :man_shrugging:\n\n### `create-woonext-app` CLI and `@woographql` packages\n\nDesigned 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.\n\n```bash\nnpx create-woonext-app \u003clicense\u003e [options]\n```\n\nThe generated application utilizes the **[`@woographql`](https://yeetsquad.net)** packages exclusive to the unlimited/annual subscribers of WooGraphQL Pro. So Go [Subscribe!](https://woographql.com/pro#pricing) :smile:. Below are more resources on the `create-woonext-app` CLI and `@woographql` packages.\n\n- [`create-woonext-app` Homepage](https://woographql.com/create-woonext-app)\n- [`create-woonext-app` on NPM](https://www.npmjs.com/package/create-woonext-app): The `create-woonext-app` README with more CLI usage instructions.\n- [`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.\n- [`@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.\n- [`@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.\n- [`@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.\n- [`@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.\n\n## Wanna help support WooGraphQL's future\n\n- Sponsor **@kidunot89** _(WPGraphQL for WooCommerce Creator/Developer)_ on **[Github](https://github.com/sponsors/kidunot89)**\n- Sponsor **WooGraphQL** on **[OpenCollective](https://opencollective.com/woographql)**\n- Sponsor **WPGraphQL** on **[OpenCollective](http://opencollective.com/wp-graphql)**\n- Sponsor **GraphQL-PHP** on **[OpenCollective](https://opencollective.com/webonyx-graphql-php)**\n- Or **[Contribute](./CONTRIBUTING.md)**\n\n## Follow [![alt text](http://i.imgur.com/tXSoThF.png)](https://twitter.com/woographql)[![alt text](http://i.imgur.com/P3YfQoD.png)](https://www.facebook.com/woographql)\n\n## Demo/Examples\n\n- Examples with Next.js\n  - [WPGraphQL for WooCommerce Demo](https://github.com/kidunot89/woographql-demo)\n  - [Next.js WooCommerce Theme](https://github.com/imranhsayed/woo-next) [[source]](https://github.com/imranhsayed/woo-next) [[demo video]](https://youtu.be/EGjY3X868YQ)\n- Examples with Gatsby\n  - [Gatsby WooCommerce Theme](https://gatsby-woocommerce-theme.netlify.app/) [[source]](https://github.com/imranhsayed/gatsby-woocommerce-themes) [[demo video]](https://youtu.be/ygaE8ZdPEX8)\n- Examples with WooGraphQL Pro [[homepage]](https://woographql.com/pro)\n  - [`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)\n  - [WPGraphQL for WooCommerce homepage](https://woographql.com)\n\n## Who using it?\n\n| \u003cimg src=\"https://www.rockymountainsewing.com/static/759d14c25bfb3243245711ce9be6600c/logo.svg\" alt=\"Rocky Mountain Sewing \u0026 Vacuum\" width=\"320\"/\u003e | \u003cimg src=\"https://russemerket.no/src/logos/Russemerket_black.svg\" alt=\"Russemerket\" width=\"320\"/\u003e | \u003cimg src=\"https://wohnparc.de/_next_public/wopa-icons/logo.svg\" alt=\"wohnparc.de\" width=\"320\"/\u003e |\n|:---------------------------------------:|:---------------------------------------:|:---------------------------------------:|\n| [Rocky Mountain Sewing \u0026 Vacuum](https://www.rockymountainsewing.com/)                     | [Russemerket](https://russemerket.no/)                     | [wohnparc.de](https://wohnparc.de/shop/)                     |\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\u003ca href=\"https://github.com/wp-graphql/wp-graphql-woocommerce/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/woographql/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/woographql/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/woographql\"\u003e\u003cimg src=\"https://opencollective.com/woographql/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/woographql/contribute)]\n\n\u003ca href=\"https://opencollective.com/woographql/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/woographql/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/woographql/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n\n**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).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-graphql%2Fwp-graphql-woocommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-graphql%2Fwp-graphql-woocommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-graphql%2Fwp-graphql-woocommerce/lists"}