Stars: 544
Forks: 110
Pull Requests: 300
Issues: 377
Watchers: 11
Last Updated: 2022-12-08 02:35:21
Add WooCommerce support and functionality to your WPGraphQL server
License: GNU General Public License v3.0
Languages: Shell, PHP, Dockerfile
Docs • AxisTaylor • Join Slack
This is the recommend way for users using unique installations like WP Bedrock or SpinupWP.
composer require wp-graphql/wp-graphql wp-graphql/wp-graphql-woocommerce
your-store.domain/graphql
. _NOTE: for typically Bedrock or SpinupWP setups it'll be your-store.domain/wp/graphql
by default.login
mutation that returns a JSON Web Token.(*) These operations have user restrictions. Please read up on authenticating an user with here, then view this React/Apollo example with the added on usage of customer session Token.
(#) This is the recommended method on checkout. You can read it's usage in this excellent write-up by @jacobarriola
The CPTs as well as most of the data objects that WooCommerce defines are wrapped in a object managers distributed by a data store system.
This data store system allows for each individual data object to be defined however needed. What this means is, although by out of the box objects like products, orders, and coupons are defined as WordPress CPTs they don't have to be.
This is what also enables WooCommerce to store most meta connected to these CPTs in separate tables. The object data doesn't even have to be in the same database if the object's data store designed to manage somewhere else, but we are getting out of the scope of this question.
What does all this
This has led to some friction is certain areas of the schema where WooGraphQL support is lacking. I'm sorry for the inconvience, myself and whole WPGraphQL org are working to reduce this friction and WooGraphQL properly integrated with all WPGraphQL + WPGraphQL ACF features.
Thank you for your patience @kidunot89
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 (*).
(*) I have a tendency to forget to update the playground between releases
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]