woocommerce/docs/contribution/contributing/zh-cn/api-critical-flows.md
2026-04-15 10:18:01 +08:00

5.5 KiB

post_title sidebar_label
Critical flows within the WooCommerce Core API API critical flows

WooCommerce Core API 中的关键流程

在说明文档中,我们已明确指出了 WooCommerce Core API 中的核心用户流程。这些流程为我们的测试工作提供了指引,帮助我们集中精力于最重要的环节。它们还为评估修改影响和确定问题优先级提供了宝贵的参考。

需要注意的是,这些流程是动态的,会随着平台的发展而同步演进。它们会定期进行更新、增补和优先级调整,以保持与系统不断变化的需求对齐。

Products

Route Flow name Endpoint Test File
Products Can view all products /wp-json/wc/v3/products tests/api-core-tests/tests/products/product-list.test.js
Products Can search products /wp-json/wc/v3/products tests/api-core-tests/tests/products/product-list.test.js
Products Can add a simple product /wp-json/wc/v3/products tests/api-core-tests/tests/products/products-crud.test.js
Products Can add a variable product /wp-json/wc/v3/products tests/api-core-tests/tests/products/products-crud.test.js
Products Can add a virtual product /wp-json/wc/v3/products tests/api-core-tests/tests/products/products-crud.test.js
Products Can view a single product /wp-json/wc/v3/products/{id} tests/api-core-tests/tests/products/products-crud.test.js
Products Can update a product /wp-json/wc/v3/products/{id} tests/api-core-tests/tests/products/products-crud.test.js
Products Can delete a product /wp-json/wc/v3/products/{id} tests/api-core-tests/tests/products/products-crud.test.js

Orders

Route Flow name Endpoints Test File
Orders Can create an order /wp-json/wc/v3/orders tests/api-core-tests/tests/orders/orders-crud.test.js
Orders Can view a single order /wp-json/wc/v3/orders/{id} tests/api-core-tests/tests/orders/orders-crud.test.js
Orders Can update an order /wp-json/wc/v3/orders/{id} tests/api-core-tests/tests/orders/orders-crud.test.js
Orders Can delete an order /wp-json/wc/v3/orders/{id} tests/api-core-tests/tests/orders/orders-crud.test.js
Orders Can view all orders /wp-json/wc/v3/orders tests/api-core-tests/tests/orders/orders.test.js
Orders Can search orders /wp-json/wc/v3/orders tests/api-core-tests/tests/orders/order-search.test.js
Orders Can add new Order complex - multiple product types & tax classes /wp-json/wc/v3/orders tests/api-core-tests/tests/orders/order-complex.test.js

Refunds

Route Flow name Endpoints Test File
Refunds Can refund an order /wp-json/wc/v3/orders/{id}/refunds tests/api-core-tests/tests/refunds/refund.test.js

Coupons

Route Flow name Endpoints Test File
Coupons Can create a coupon /wp-json/wc/v3/coupons tests/api-core-tests/tests/coupons/coupons.test.js
Coupons Can update a coupon /wp-json/wc/v3/coupons/{id} tests/api-core-tests/tests/coupons/coupons.test.js
Coupons Can delete a coupon /wp-json/wc/v3/coupons/{id} tests/api-core-tests/tests/coupons/coupons.test.js
Coupons Can add a coupon to order /wp-json/wc/v3/orders/{id}/coupons tests/api-core-tests/tests/coupons/coupons.test.js

Shipping

Route Flow name Endpoints Test File
Shipping zones Can create shipping zones /wp-json/wc/v3/shipping/zones tests/api-core-tests/tests/shipping/shipping-zones.test.js
Shipping methods Can create shipping method to a shipping zone /wp-json/wc/v3/shipping/zones/{id}/methods n/a
Shipping classes Can create a product shipping class /wp-json/wc/v3/products/shipping_classes tests/api-core-tests/tests/products/products-crud.test.js