跳到主要内容

WooCommerce Core API 中的关键流程

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

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

Products

RouteFlow nameEndpointTest File
ProductsCan view all products/wp-json/wc/v3/productstests/api-core-tests/tests/products/product-list.test.js
ProductsCan search products/wp-json/wc/v3/productstests/api-core-tests/tests/products/product-list.test.js
ProductsCan add a simple product/wp-json/wc/v3/productstests/api-core-tests/tests/products/products-crud.test.js
ProductsCan add a variable product/wp-json/wc/v3/productstests/api-core-tests/tests/products/products-crud.test.js
ProductsCan add a virtual product/wp-json/wc/v3/productstests/api-core-tests/tests/products/products-crud.test.js
ProductsCan view a single product/wp-json/wc/v3/products/{id}tests/api-core-tests/tests/products/products-crud.test.js
ProductsCan update a product/wp-json/wc/v3/products/{id}tests/api-core-tests/tests/products/products-crud.test.js
ProductsCan delete a product/wp-json/wc/v3/products/{id}tests/api-core-tests/tests/products/products-crud.test.js

Orders

RouteFlow nameEndpointsTest File
OrdersCan create an order/wp-json/wc/v3/orderstests/api-core-tests/tests/orders/orders-crud.test.js
OrdersCan view a single order/wp-json/wc/v3/orders/{id}tests/api-core-tests/tests/orders/orders-crud.test.js
OrdersCan update an order/wp-json/wc/v3/orders/{id}tests/api-core-tests/tests/orders/orders-crud.test.js
OrdersCan delete an order/wp-json/wc/v3/orders/{id}tests/api-core-tests/tests/orders/orders-crud.test.js
OrdersCan view all orders/wp-json/wc/v3/orderstests/api-core-tests/tests/orders/orders.test.js
OrdersCan search orders/wp-json/wc/v3/orderstests/api-core-tests/tests/orders/order-search.test.js
OrdersCan add new Order complex - multiple product types & tax classes/wp-json/wc/v3/orderstests/api-core-tests/tests/orders/order-complex.test.js

Refunds

RouteFlow nameEndpointsTest File
RefundsCan refund an order/wp-json/wc/v3/orders/{id}/refundstests/api-core-tests/tests/refunds/refund.test.js

Coupons

RouteFlow nameEndpointsTest File
CouponsCan create a coupon/wp-json/wc/v3/couponstests/api-core-tests/tests/coupons/coupons.test.js
CouponsCan update a coupon/wp-json/wc/v3/coupons/{id}tests/api-core-tests/tests/coupons/coupons.test.js
CouponsCan delete a coupon/wp-json/wc/v3/coupons/{id}tests/api-core-tests/tests/coupons/coupons.test.js
CouponsCan add a coupon to order/wp-json/wc/v3/orders/{id}/couponstests/api-core-tests/tests/coupons/coupons.test.js

Shipping

RouteFlow nameEndpointsTest File
Shipping zonesCan create shipping zones/wp-json/wc/v3/shipping/zonestests/api-core-tests/tests/shipping/shipping-zones.test.js
Shipping methodsCan create shipping method to a shipping zone/wp-json/wc/v3/shipping/zones/{id}/methodsn/a
Shipping classesCan create a product shipping class/wp-json/wc/v3/products/shipping_classestests/api-core-tests/tests/products/products-crud.test.js