WPGraphQL for WooCommerce
This FREE plugin exposes WooCommerce data to WPGraphQL allowing you to interact with your store’s data via GraphQL Queries and mutations.
Community PluginView Plugin on Github
- Install & activate WooCommerce
- Install & activate WPGraphQL
- Clone or download the zip of this repository into your WordPress plugin directory & activate the WP GraphQL WooCommerce plugin.
- (Optional) Install & activate WPGraphQL-JWT-Authentication to add a
loginmutation that returns a JSON Web Token.
- (Optional) Install & activate WPGraphQL-CORS to add an extra layer of security using HTTP CORS and some of WPGraphQL advanced functionality.
It adds WooCommerce functionality to the WPGraphQL schema using WooCommerce's CRUD objects.
- Query product, product variations, customers, coupons, orders, refunds and more with complex filtering options.
- Manipulate customer session data using customer and cart mutations while managing customer session token using HTTP headers or cookies (not recommended). HTTP header example w/ React/Apollo
- Create orders using the
ordermutations with the
- Payment Processing
- Adminstrator mutations. Eg. Creating and deleting products, coupons, and refunds.
Feel free to test out the extension using this GraphiQL Playground. The playground allows you to execute queries and mutations, as well as view the schema.
- Sponsor @kidunot89 (WooGraphQL Creator/Developer) on Github
- Sponsor WooGraphQL on OpenCollective
- Sponsor WPGraphQL on OpenCollective
- Sponsor GraphQL-PHP on OpenCollective
- Or Contribute
- Examples with Next.js
- Next.js WooCommerce Theme [source] [demo video]
- Examples with Gatsby
- Gatsby WooCommerce Theme [source] [demo video]
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]