WooCommerce 文档

title: "WooCommerce CLI 命令" post_status: publish comment_status: open taxonomy: category: - woocommerce post_tag: - Wc Cli - Repos - Data


WooCommerce CLI 命令

概述

本文档是 WooCommerce 命令行界面 (WC-CLI) 命令的综合参考。它包含每个命令的语法、选项和简要描述。这些命令适用于 WooCommerce 版本 3.0.0 及更高版本。

通用命令结构

WC-CLI 命令的通用语法如下:

wp wc [命令] [选项]

要获取任何特定命令的详细帮助,请使用:

wp wc [命令] --help

命令

wc blueprint

wc blueprint import [结构化数据路径]

wc blueprint export [保存到文件名]

wc com

wc com extension list

默认:table

选项:table, csv, json, yaml

默认:all

选项:product_slug, product_name, auto_renew, expires_on, expired, sites_max, sites_active, maxed

wc com extension install [扩展]

wc customer

wc customer list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc customer create

wc customer get [id]

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc customer update [id]

wc customer delete [id]

wc customer_download

wc customer_download list <customer_id>

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc order_note

wc order_note list <order_id>

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc order_note create <order_id>

wc order_note get <order_id> [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc order_note delete <order_id> [id]

wc payment_gateway

wc payment_gateway list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc payment_gateway get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc payment_gateway update [id]

wc product

wc product list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product create

wc product get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product update [id]

wc product delete [id]

wc product_attribute_term

wc product_attribute_term list <attribute_id>

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_attribute_term create <attribute_id>

wc product_attribute_term get <attribute_id> [id]

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_attribute_term update <attribute_id> [id]

wc product_attribute_term delete <attribute_id> [id]

wc product_attribute

wc product_attribute list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_attribute create

wc product_attribute get [id]

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_attribute update [id]

wc product_attribute delete [id]

wc product_cat

wc product_cat list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_cat create

wc product_cat get [id]

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_cat update [id]

wc product_cat delete [id]

wc product_review

wc product_review list <product_id>

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_review create <product_id>

wc product_review get <product_id> [id]

默认值: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_review update <product_id> [id]

wc product_review delete <product_id> [id]

wc product_shipping_class

wc product_shipping_class list

默认值: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_shipping_class create

wc product_shipping_class get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_shipping_class update [id]

wc product_shipping_class delete [id]

wc product_tag

wc product_tag list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_tag create

wc product_tag get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_tag update [id]

wc product_tag delete [id]

wc product_variation

wc product_variation list <product_id>

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc product_variation create ""

wc product_variation get "" [id]

默认值: table

选项: table, json, csv, ids, yaml, count, headers, body, envelope

wc product_variation update <product_id> [id]

wc product_variation delete <product_id> [id]

wc setting

wc setting get [id]

默认: table

选项: table, json, csv, ids, yaml, count, headers, body, envelope

wc setting update [id]

wc shipping_method

wc shipping_method list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_method get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone

wc shipping_zone list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone create

wc shipping_zone get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone update [id]

wc shipping_zone delete [id]

wc shipping_zone_location

wc shipping_zone_location list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone_method

wc shipping_zone_method list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone_method create

wc shipping_zone_method get [id]

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shipping_zone_method update [id]

wc shipping_zone_method delete [id]

wc shop_coupon

wc shop_coupon list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_coupon create

wc shop_coupon get [id]

默认: table

选项: table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_coupon update [id]

wc shop_coupon delete [id]

wc shop_order

wc shop_order list

默认值: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_order create

wc shop_order get [id]

默认值: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_order update [id]

wc shop_order delete [id]

wc shop_order_refund

wc shop_order_refund list <order_id>

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_order_refund create <order_id>

wc shop_order_refund get <order_id> [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc shop_order_refund delete <order_id> [id]

wc tax

wc tax list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc tax create

wc tax get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc tax update [id]

wc tax delete [id]

wc tax_class

wc tax_class list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc tax_class create

wc tax_class delete [id]

wc webhook

wc webhook list

默认: table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc webhook create

wc webhook get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc webhook update [id]

wc webhook delete [id]

wc webhook_delivery

wc webhook_delivery list

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope

wc webhook_delivery get [id]

默认:table

选项:table, json, csv, ids, yaml, count, headers, body, envelope