WooGraphQL Product Bundles
Add WooCommerce Product Bundle support to your WPGraphQL schema
by Jacob Arriola · github.com/jacobarriola/woographql-product-bundles · website
★ 10stars
595composer installs
4forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jacobarriola/woographql-product-bundles/archive/refs/heads/master.zipAlso on Packagist as jacobarriola/woographql-product-bundles:
composer require jacobarriola/woographql-product-bundlesFrom the readme
WooGraphQL Product Bundles
Add WooCommerce Product Bundle support to your WPGraphQL schema.
Requirements
PHP +7.1
WordPress +5.0
WPGraphQL +1
WooGraphQL +0.8.0
WooCommerce +4.7.0
WooCommerce Product Bundles +0.5.0
Documentation
Add To Cart Mutation
For now, add to cart is a different mutation since additional data is required. The mutation
mimics the existing WooGraphQL addToCart, with a few differences.
Essentially it attempts to mimic the underlying Product Bundles' API, which is found https://docs.woocommerce.com/document/bundles/bundles-functions-reference/#addbundletocart
The extraData input is a JSON value.
Arguments
object index: The bundle item ID
productid: Product ID of the bundled item
quantity: Quantity of the bundled item
variationid: The variation ID of the selected variation, if applicable
attributes: An object with the key as attributeATTRIBUTESLUG and the value as the
attribute value, if applicable
Example:
In this example, the Bundle contains two Bundle Items, 765 and 896. 765 is a variable
product (designated by the productid: 9876). The variationid and attributes are required
. On the other hand, 896 is a simple product. It's only pass
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.