chore: v1.0.0 release preparation (#1007)

- Update plugin version to 1.0.0 and bump dependency requirements
  (WP 6.3+, PHP 8.1+, WC 9.0+, WPGraphQL 2.0+)
- Update README.md, README.txt, and docs with v1.0.0 features
- Add building-a-woocommerce-admin-app.md documenting WC Settings API,
  product CRUD, product attribute management, and refund operations
- Update settings.md with new v1.0.0 settings documentation
- Update installation.md with version prerequisites
- Remove obsolete toc.md (replaced by docs/README.md)
- Update @since tags from TBD to 1.0.0
This commit is contained in:
Geoff Taylor
2026-03-31 11:06:51 -04:00
committed by GitHub
parent 2107c7e034
commit b42223f226
52 changed files with 447 additions and 178 deletions
+60
View File
@@ -1,5 +1,65 @@
# Changelog
## [v1.0.0](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v1.0.0) (2026-03-31)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.21.2...v1.0.0)
**Breaking changes:**
- fix: HPOS order mutation data loss, COT cursor pagination, email tests, checkout auth [\#1003](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1003) ([kidunot89](https://github.com/kidunot89))
- feat: WC Settings API, compatibility refactor, HPOS fix [\#1002](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1002) ([kidunot89](https://github.com/kidunot89))
- Improve i18n compatibility for WPML, Polylang, and non-latin characters [\#994](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/994) ([kidunot89](https://github.com/kidunot89))
**New Features:**
- Add authenticated download URLs for headless frontends [\#995](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/995) ([kidunot89](https://github.com/kidunot89))
- feat: add session transfer behavior setting for login session handling [\#993](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/993) ([kidunot89](https://github.com/kidunot89))
- feat: product attribute queries, connections, and variation attribute filtering [\#980](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/980) ([kidunot89](https://github.com/kidunot89))
- feat: Add support for brands \(\#918\) [\#964](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/964) ([lewebsimple](https://github.com/lewebsimple))
- fix: Checkout notices further implemented [\#951](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/951) ([kidunot89](https://github.com/kidunot89))
- fix: Add direct or/and syntax support to ProductTaxonomyInput and fix test issues [\#948](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/948) ([kidunot89](https://github.com/kidunot89))
- Adds support for Cart tax\_lines [\#940](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/940) ([MoscoviumAlchemist](https://github.com/MoscoviumAlchemist))
- feat: `productAttributes` query implemented [\#905](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/905) ([kidunot89](https://github.com/kidunot89))
- feat: Product and product attribute mutations [\#851](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/851) ([kidunot89](https://github.com/kidunot89))
**Fixed:**
- fix: Elementor breaks transfer-session endpoint [\#1004](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1004) ([kidunot89](https://github.com/kidunot89))
- fix: downloadsRemaining returns null for numeric string values [\#1000](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1000) ([kidunot89](https://github.com/kidunot89))
- fix: Order status filter incorrectly uses single value [\#999](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/999) ([kidunot89](https://github.com/kidunot89))
- fix: use term name for variation attribute label instead of taxonomy slug [\#996](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/996) ([kidunot89](https://github.com/kidunot89))
- fix: prevent WooCommerce session creation on CORS preflight OPTIONS requests [\#992](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/992) ([kidunot89](https://github.com/kidunot89))
- fix: add calculate\_totals\(\) after coupon removal in removeCoupons mutation [\#991](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/991) ([kidunot89](https://github.com/kidunot89))
- fix: term\_taxonomy\_id mismatch in coupon category connections [\#985](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/985) ([kidunot89](https://github.com/kidunot89))
- fix: coupon error handling in fillCart and applyCoupon mutations [\#984](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/984) ([kidunot89](https://github.com/kidunot89))
- fix: customer order query strips pagination and where args [\#981](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/981) ([kidunot89](https://github.com/kidunot89))
- fix: refresh order object after meta save in checkout mutation [\#978](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/978) ([kidunot89](https://github.com/kidunot89))
- devops: add checkout shipping method selection regression test [\#977](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/977) ([kidunot89](https://github.com/kidunot89))
- fix: add authenticate flag to registerCustomer mutation [\#973](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/973) ([kidunot89](https://github.com/kidunot89))
- test: add customer refund fields visibility test [\#972](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/972) ([kidunot89](https://github.com/kidunot89))
- fix: inverted logic in pop\_transaction\_id\(\) causes cart session corruption [\#971](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/971) ([kidunot89](https://github.com/kidunot89))
- fix: Sanitize ProductAttribute name to match VariationAttribute \[\#965\] [\#966](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/966) ([lewebsimple](https://github.com/lewebsimple))
- fix: id fields added back to PaymentTokenInterface type [\#963](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/963) ([kidunot89](https://github.com/kidunot89))
- fix: product variation duplicate fields removed [\#957](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/957) ([kidunot89](https://github.com/kidunot89))
- fix: updated data-loaders to be in compliance with WPGraphQL v2.3.x+ [\#953](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/953) ([kidunot89](https://github.com/kidunot89))
- Automatically get and set data from the specified product ID [\#947](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/947) ([kermage](https://github.com/kermage))
**Other Changes:**
- devops: Variable product performance optimization [\#1006](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1006) ([kidunot89](https://github.com/kidunot89))
- perf: Migrate type descriptions to lazy lambdas [\#1005](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/1005) ([kidunot89](https://github.com/kidunot89))
- devops: add createOrder stock reduction test [\#990](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/990) ([kidunot89](https://github.com/kidunot89))
- devops: add products query with categoryId, status, visibility, and pagination test [\#989](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/989) ([kidunot89](https://github.com/kidunot89))
- devops: add nested category products regression test [\#988](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/988) ([kidunot89](https://github.com/kidunot89))
- devops: add attribute term products categoryId filter regression test [\#987](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/987) ([kidunot89](https://github.com/kidunot89))
- devops: add taxonomy filter multi-term regression tests [\#986](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/986) ([kidunot89](https://github.com/kidunot89))
- devops: add updateOrder metaData duplicate order regression test [\#983](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/983) ([kidunot89](https://github.com/kidunot89))
- devops: add variable product defaultAttributes test coverage [\#982](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/982) ([kidunot89](https://github.com/kidunot89))
- devops: add hCaptcha session token regression test [\#979](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/979) ([kidunot89](https://github.com/kidunot89))
- devops: add product category children connection test [\#975](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/975) ([kidunot89](https://github.com/kidunot89))
- chore: Add logo to docs README.md [\#970](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/970) ([kidunot89](https://github.com/kidunot89))
- feat: Add Store API Cart-Token compatibility and session handler improvements [\#954](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/954) ([kidunot89](https://github.com/kidunot89))
## [v0.21.2](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.21.2) (2025-03-01)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.21.1...v0.21.2)
+2 -5
View File
@@ -34,8 +34,10 @@
- Query your shop's products and variations with detailed filtering options.
- Query customers, orders, coupons, and refunds. Note: Operations have user restrictions.
- Create and delete refunds on orders.
- Manage customer sessions using JWTs or WooCommerce Store API Cart-Tokens, and use cart/customer queries and mutations. Note: Operations have user restrictions.
- 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.
- Query and update WooCommerce settings via the GraphQL API.
(*) These operations have user restrictions. Learn how to utilize them correctly at the resources listed below:
@@ -68,11 +70,6 @@ Such a setup has resulted in some disparities between the schema where WPGraphQL
Thank you for your patience :smile:
[@kidunot89](https://github.com/kidunot89)
## Future Features
- Product CRUD mutations.
- And some other stuff I'm sure :thinking:
## For WooCommerce Extensions Support
**[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.
+6 -6
View File
@@ -1,13 +1,13 @@
=== WPGraphQL for WooCommerce ===
Contributors: kidunot89, ranaaterning, jasonbahl, saleebm
Tags: GraphQL, WooCommerce, WPGraphQL
Requires at least: 6.1
Tested up to: 6.2
Requires PHP: 7.3
Requires WooCommerce: 8.9.0
Requires WPGraphQL: 1.25.0+
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 8.1
Requires WooCommerce: 9.0.0
Requires WPGraphQL: 2.0.0
Works with WPGraphQL-JWT-Authentication: 0.7.0+
Stable tag: 0.21.2
Stable tag: 1.0.0
License: GPL-3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Maintained at: https://github.com/wp-graphql/wp-graphql-woocommerce
+5 -4
View File
@@ -32,6 +32,7 @@ WPGraphQL for WooCommerce (WooGraphQL) is a free, open-source WordPress plugin t
- [Using Checkout Mutation + Order Mutations](./using-checkout-mutation-and-order-mutations.md)
- [Using Order Data](./using-order-data.md)
- [Using Customer Data + Mutations](./using-customer-data-and-mutations.md)
- [Building a WooCommerce Admin App](./building-a-woocommerce-admin-app.md)
### WooGraphQL Pro
@@ -66,9 +67,9 @@ Whether you're building a React, Vue, or any other frontend application, WooGrap
### Requirements
- WordPress 5.6+
- WooCommerce 6.0+
- WPGraphQL 1.14+
- PHP 7.4+
- WordPress 6.3+
- WooCommerce 9.0+
- WPGraphQL 2.0+
- PHP 8.1+
Get started by following the [Installation Guide](./installation.md).
+294
View File
@@ -0,0 +1,294 @@
<!--
title: "Building a WooCommerce Admin App with WooGraphQL"
description: "Learn how to use WooGraphQL's admin-level queries and mutations to build a WooCommerce management interface, including WC Settings, product CRUD, product attribute management, and refund operations."
keywords: "WooGraphQL, WPGraphQL, WooCommerce, GraphQL, admin, settings, products, refunds, mutations"
author: "Geoff Taylor"
-->
# Building a WooCommerce Admin App
WooGraphQL v1.0.0 introduces several admin-level queries and mutations that enable building custom WooCommerce management interfaces through GraphQL. This guide covers the WC Settings API, product and product attribute CRUD mutations, and refund operations.
All operations in this guide require `manage_woocommerce` or equivalent capabilities. Authenticate your requests using [WPGraphQL JWT Authentication](https://github.com/wp-graphql/wp-graphql-jwt-authentication) or [WPGraphQL Headless Login](https://github.com/AxeWP/wp-graphql-headless-login) with an admin or shop manager account.
## WooCommerce Settings API
### Querying Setting Groups
Retrieve all available WooCommerce setting groups:
```graphql
query {
wcSettingGroups {
id
label
description
parentId
}
}
```
### Querying Settings in a Group
Retrieve all settings within a specific group:
```graphql
query {
wcSettings(group: "general") {
id
label
description
type
value
default
options {
key
value
}
}
}
```
Common groups include `general`, `products`, `tax`, `shipping`, `checkout`, `account`, and `email`.
### Updating a Single Setting
```graphql
mutation {
updateWCSetting(input: {
group: "general"
id: "woocommerce_store_city"
value: "New York"
}) {
setting {
id
label
value
}
}
}
```
### Updating Multiple Settings
```graphql
mutation {
updateWCSettings(input: {
group: "general"
settings: [
{ id: "woocommerce_store_city", value: "New York" }
{ id: "woocommerce_store_postcode", value: "10001" }
{ id: "woocommerce_default_country", value: "US:NY" }
]
}) {
settings {
id
value
}
}
}
```
## Product Mutations
### Creating a Simple Product
```graphql
mutation {
createProduct(input: {
name: "Premium T-Shirt"
type: SIMPLE
regularPrice: "29.99"
description: "A high-quality cotton t-shirt."
shortDescription: "Premium cotton tee."
sku: "TSHIRT-001"
stockQuantity: 100
manageStock: true
categories: [{ id: 15 }]
}) {
product {
databaseId
name
... on SimpleProduct {
price
regularPrice
sku
stockQuantity
}
}
}
}
```
### Updating a Product
```graphql
mutation {
updateProduct(input: {
id: "cHJvZHVjdDoxMDA="
salePrice: "24.99"
stockQuantity: 85
}) {
product {
databaseId
... on SimpleProduct {
price
salePrice
stockQuantity
}
}
}
}
```
### Deleting a Product
```graphql
mutation {
deleteProduct(input: {
id: "cHJvZHVjdDoxMDA="
forceDelete: true
}) {
product {
databaseId
name
}
}
}
```
## Product Attribute Management
### Creating a Product Attribute
```graphql
mutation {
createProductAttribute(input: {
name: "Material"
slug: "material"
hasArchives: true
orderBy: "name"
}) {
attribute {
id
name
slug
}
}
}
```
### Creating Attribute Terms
```graphql
mutation {
createProductAttributeTerm(input: {
attributeId: 1
name: "Cotton"
slug: "cotton"
}) {
term {
id
name
slug
}
}
}
```
## Refund Operations
### Creating a Refund
Create a refund on a completed order:
```graphql
mutation {
createRefund(input: {
orderId: 123
amount: "15.00"
reason: "Customer requested partial refund"
}) {
refund {
databaseId
amount
reason
date
refundedBy {
name
}
}
order {
databaseId
total
status
}
}
}
```
The `createRefund` mutation supports these optional fields:
- `refundPayment` — When `true`, triggers the payment gateway's refund API (e.g., Stripe refund).
- `restockItems` — When `true`, restocks the refunded items.
- `metaData` — Attach custom metadata to the refund.
### Deleting a Refund
```graphql
mutation {
deleteRefund(input: {
id: "b3JkZXI6NDU="
}) {
refund {
databaseId
amount
}
order {
databaseId
total
}
}
}
```
**Note:** WooCommerce does not support updating refunds after creation. Refunds are immutable financial records and can only be created or deleted.
### Querying Refunds on an Order
Refunds are available through the `refunds` connection on Order types:
```graphql
query {
order(id: "b3JkZXI6MTIz") {
databaseId
total
refunds {
nodes {
databaseId
amount
reason
date
refundedBy {
name
}
}
}
}
}
```
## Authorization
All admin operations require appropriate capabilities:
| Operation | Required Capability |
|-----------|-------------------|
| WC Settings queries | `manage_woocommerce` |
| WC Settings mutations | `manage_woocommerce` |
| Product create/update/delete | `edit_products` / `delete_products` |
| Product attribute CRUD | `manage_product_terms` |
| Create refund | `edit_shop_orders` |
| Delete refund | `delete_shop_orders` |
For client-side admin apps, authenticate with a shop manager or administrator account. For server-side applications, consider using [WordPress Application Passwords](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/) with the WPGraphQL introspection endpoint.
+4 -2
View File
@@ -11,8 +11,10 @@ This section will walk you through the process of installing and configuring WPG
## Prerequisites
1. A WordPress website with WooCommerce installed and activated.
2. WPGraphQL plugin installed and activated.
1. WordPress 6.3 or higher.
2. PHP 8.1 or higher.
3. [WooCommerce](https://woocommerce.com/) 9.0 or higher installed and activated.
4. [WPGraphQL](https://www.wpgraphql.com/) 2.0 or higher installed and activated.
## Step-by-step guide
+26 -4
View File
@@ -21,13 +21,35 @@ WPGraphQL for WooCommerce comes with a custom WooCommerce User Session Handler c
The default WooCommerce User Session Handler is responsible for capturing cart and customer data for end-users and storing it temporarily in the WordPress database. It provides an HTTP cookie to the end-user's machine to keep track of this session, even if they aren't a registered member of the WordPress site. The session typically stays in the database for 14 days from its last save, after which it is deleted. The problem with HTTP cookies is that they typically cannot be used across multiple domains without complex configurations.
## Enable Unsupported types
## Enable QL Session Handler on WC AJAX / WP REST Requests
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.
These two settings extend the QL Session Handler's JWT-based session identification to WooCommerce AJAX requests and WordPress REST API requests respectively. Enable these if your headless application also interacts with WC AJAX or REST endpoints and needs consistent session handling.
![Authorizing URL Settings Screenshot](images/authorizing-url-settings.png)
## Session Token Type
## Enable User Session transferring URLs
Choose which session token type(s) to generate:
- **Legacy** — GraphQL session tokens only (default).
- **Store API** — WooCommerce Blocks Cart-Token only (requires WooCommerce 5.5.0+).
- **Both** — Generates both token types for maximum compatibility with headless implementations that use WooCommerce Blocks alongside GraphQL.
## Session Transfer Behavior
Controls how cart data is handled when a user logs in with an existing session from another device:
- **Keep new, fallback to old** — Keeps the current session data if non-empty, otherwise restores the previously saved session (default).
- **Keep new** — Always uses the current session data.
- **Keep old** — Restores the previously saved session data, discarding the current session.
## Transliterate Non-Latin Characters
Converts non-latin characters (Cyrillic, Chinese, Arabic, etc.) to their latin equivalents in GraphQL type and enum names. Enable this if your WooCommerce tax classes, product attributes, or taxonomies use non-latin names. Requires the PHP `intl` extension.
## Enable Unsupported Types
When enabled, any product type without a dedicated GraphQL type will default to the `UnsupportedProduct` type, which is identical to the `SimpleProduct` type. This allows you to still query the product and pull extra data from the `metaData` field. Useful when using WC extensions with custom product types not natively supported by WooGraphQL.
## Enable User Session Transferring URLs
This setting, when activated, enables WooCommerce Session-backed nonce generator and transfer session endpoint for passing a user's session from a client to the WordPress installation. The primary use of these nonces is to create authorizing URLs that enable the user to travel to the backend as if it were a part of the front-end application. This setting is disabled if the QL Session Handler is disabled as it required for nonce generation to work.
-39
View File
@@ -1,39 +0,0 @@
# Table of Contents
## Getting Started
- [Installation](installation.md)
- [Settings](settings.md)
- [Configuring GraphQL Client For the User Session](configuring-graphql-client-for-user-session.md)
- [Handling User Authentication](handling-user-authentication.md)
## WooGraphQL
- [Routing by URI](routing-by-uri.md)
- [Using Product Data](using-product-data.md)
- [Creating Session Provider and using Cart Mutations](handling-user-session-and-using-cart-mutations.md)
- [Using Cart Data](using-cart-data.md)
- [Harmonizing with WordPress](harmonizing-with-wordpress.md)
- [Using Checkout Mutation + Order Mutations](using-checkout-mutation-and-order-mutations.md)
- [Using Order Data](using-order-data.md)
- [Using Customer Data + Mutations](using-customer-data-and-mutations.md)
## WooGraphQL Pro
For documentation on using premium WooCommerce extensions with WooGraphQL, see the [WooGraphQL Pro Documentation](https://woographql.com/docs/woographql-pro).
## Extending WooGraphQL
- [Registering New Product Types](registering-new-product-types.md)
- [Extending Mutations](extending-mutations.md)
## Contributing
- [Testing Quick-Start Guide](testing-quick-start.md)
- [Local CLI Testing](local-testing.md)
- [Development with Docker](development-w-docker.md)
- [CLI Testing with Docker](testing-w-docker.md)
## Glossary
- [Schema Docs](https://woographql.com/schema)
+1 -1
View File
@@ -3,7 +3,7 @@
* Compatibility integrations with third-party plugins.
*
* @package \WPGraphQL\WooCommerce
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce;
+1 -1
View File
@@ -3,7 +3,7 @@
* Registers WooCommerce taxonomies to the GraphQL schema.
*
* @package \WPGraphQL\WooCommerce
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce;
@@ -82,10 +82,10 @@ class Product_Attribute_Connection_Resolver {
*
* @return array|null
*
* @deprecated TBD
* @deprecated 1.0.0
*/
public function resolve( $source, array $args, AppContext $context, ResolveInfo $info, $type = null ) {
_deprecated_function( __METHOD__, 'TBD', static::class . '::get_connection()' );
_deprecated_function( __METHOD__, '1.0.0', static::class . '::get_connection()' );
$this->source = $source;
$this->args = $args;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Shipping Methods defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Downloadable Items defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Order Items defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Shipping Methods defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Shipping Zones defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Tax Classes defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -5,7 +5,7 @@
* Loads Models for WooCommerce Tax Rates defined in custom DB tables.
*
* @package WPGraphQL\WooCommerce\Data\Loader
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Loader;
@@ -3,7 +3,7 @@
* Defines helper functions for executing mutations related to products.
*
* @package WPGraphQL\WooCommerce\Data\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Data\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for create an order note.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for delete an order note.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for creating a product attribute.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for deleting a product attribute.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for creating a product attribute term.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for deleting a product attribute term.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for updating a product attribute term.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for updating a product attribute.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for creating a product.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for deleting a product.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for updating a product.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for creating a product variation.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for deleting a product variation.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -5,7 +5,7 @@
* Registers mutation for updating a product variation.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for creating a refund on an order.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
-68
View File
@@ -1,68 +0,0 @@
<?php
/**
* Mutation - deleteRefund
*
* Registers mutation for delete a refund on an order.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TDB
*/
namespace WPGraphQL\WooCommerce\Mutation;
use GraphQL\Error\UserError;
use GraphQL\Type\Definition\ResolveInfo;
use WC_Order_Factory;
use WPGraphQL\AppContext;
use WPGraphQL\WooCommerce\Data\Mutation\Order_Mutation;
use WPGraphQL\WooCommerce\Model\Order;
/**
* Class Refund_Delete
*/
class Refund_Delete {
/**
* Registers mutation
*
* @return void
*/
public static function register_mutation() {
register_graphql_mutation(
'deleteRefund',
[
'inputFields' => self::get_input_fields(),
'outputFields' => self::get_output_fields(),
'mutateAndGetPayload' => self::mutate_and_get_payload(),
]
);
}
/**
* Defines the mutation input field configuration
*
* @return array
*/
public static function get_input_fields() {
return [];
}
/**
* Defines the mutation output field configuration
*
* @return array
*/
public static function get_output_fields() {
return [];
}
/**
* Defines the mutation data modification closure.
*
* @return callable
*/
public static function mutate_and_get_payload() {
return static function ( $input, AppContext $context, ResolveInfo $info ) {
return [ 'id' => 0 ];
};
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for deleting a refund on an order.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for updating a single WooCommerce setting.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
+1 -1
View File
@@ -5,7 +5,7 @@
* Registers mutation for batch updating WooCommerce settings within a group.
*
* @package WPGraphQL\WooCommerce\Mutation
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Mutation;
@@ -3,7 +3,7 @@
* WPEnum Type - Cart_Notice_Type
*
* @package WPGraphQL\WooCommerce\Type\WPEnum
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPEnum;
+1 -1
View File
@@ -3,7 +3,7 @@
* WPInputObjectType - FeeInput
*
* @package WPGraphQL\WooCommerce\Type\WPInputObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInputObject;
@@ -3,7 +3,7 @@
* WPInputObjectType - ProductAttributesInput
*
* @package WPGraphQL\WooCommerce\Type\WPInputObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInputObject;
@@ -3,7 +3,7 @@
* WPInputObjectType - ProductDimensionsInput
*
* @package WPGraphQL\WooCommerce\Type\WPInputObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInputObject;
@@ -3,7 +3,7 @@
* WPInputObjectType - ProductDownloadInput
*
* @package WPGraphQL\WooCommerce\Type\WPInputObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInputObject;
@@ -3,7 +3,7 @@
* WPInputObjectType - ProductImageInput
*
* @package WPGraphQL\WooCommerce\Type\WPInputObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInputObject;
+1 -1
View File
@@ -6,7 +6,7 @@
* by all WC setting concrete types.
*
* @package WPGraphQL\WooCommerce\Type\WPInterface
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPInterface;
+1 -1
View File
@@ -3,7 +3,7 @@
* WPObject Type - Cart_Notice
*
* @package WPGraphQL\WooCommerce\Type\WPObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPObject;
@@ -5,7 +5,7 @@
* Registers OrderNote WPObject type and queries
*
* @package WPGraphQL\WooCommerce\Type\WPObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPObject;
@@ -5,7 +5,7 @@
* Registers ProductAttributeObject type
*
* @package WPGraphQL\WooCommerce\Type\WPObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPObject;
@@ -5,7 +5,7 @@
* Registers ProductAttributeTermObject type
*
* @package WPGraphQL\WooCommerce\Type\WPObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPObject;
@@ -5,7 +5,7 @@
* Registers WCSettingGroup WPObject type
*
* @package WPGraphQL\WooCommerce\Type\WPObject
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Type\WPObject;
+1 -1
View File
@@ -3,7 +3,7 @@
* Label utility functions for GraphQL name formatting.
*
* @package WPGraphQL\WooCommerce\Utils
* @since TBD
* @since 1.0.0
*/
namespace WPGraphQL\WooCommerce\Utils;
+7 -7
View File
@@ -3,18 +3,18 @@
* Plugin Name: WPGraphQL for WooCommerce (WooGraphQL)
* Plugin URI: https://github.com/wp-graphql/wp-graphql-woocommerce
* Description: Adds Woocommerce functionality to WPGraphQL schema.
* Version: 0.21.2 ~ Beta
* Version: 1.0.0
* Author: kidunot89
* Author URI: https://axistaylor.com
* Text Domain: wp-graphql-woocommerce
* Domain Path: /languages
* License: GPL-3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 6.1
* Requires PHP: 7.3
* WC requires at least: 8.9.0
* WC tested up to: 9.3.3
* WPGraphQL requires at least: 1.27.0+
* Requires at least: 6.3
* Requires PHP: 8.1
* WC requires at least: 9.0.0
* WC tested up to: 10.4.3
* WPGraphQL requires at least: 2.0.0
* WPGraphQL-JWT-Authentication requires at least: 0.7.0+
* WPGraphQL-Headless-Login requires at least: 0.1.4+
*
@@ -45,7 +45,7 @@ if ( file_exists( __DIR__ . '/c3.php' ) ) {
function constants() {
// Plugin version.
if ( ! defined( 'WPGRAPHQL_WOOCOMMERCE_VERSION' ) ) {
define( 'WPGRAPHQL_WOOCOMMERCE_VERSION', '0.21.2' );
define( 'WPGRAPHQL_WOOCOMMERCE_VERSION', '1.0.0' );
}
// Plugin Folder Path.
if ( ! defined( 'WPGRAPHQL_WOOCOMMERCE_PLUGIN_DIR' ) ) {