-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Legacy CLI commands (v2.6 and below)
The support WP-CLI started in WooCommerce 2.5, allowing you to manage products, coupons, orders, customers and more by a command line interface.
For those who have never heard before WP-CLI, here's a brief description extracted from the official website.
WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser.
All WooCommerce related commands are grouped into wp wc command, see an example:
$ wp wc
usage: wp wc coupon <command>
or: wp wc customer <command>
or: wp wc order <command>
or: wp wc product <command>
or: wp wc report <command>
or: wp wc tax <command>
or: wp wc tool <command>
See 'wp help wc <command>' for more information on a specific command.
You can see more details about the commands using wp help wc:
**NAME**
wp wc
**DESCRIPTION**
Manage WooCommerce from CLI.
**SYNOPSIS**
wp wc <command>
**SUBCOMMANDS**
customer Manage Customers.
order Manage Orders.
product Manage Products.
report Show Reports.
tax Manage Taxes.
tool Tools for WooCommerce.
wp wc coupon <command>
wp wc coupon create [--<field>=<value>] [--porcelain]
[--<field>=<value>]-
[--porcelain]- Outputs just the new coupon id.
codetypeamountdescriptionexpiry_dateindividual_useproduct_idsexclude_product_idsusage_limitusage_limit_per_userlimit_usage_to_x_itemsusage_countenable_free_shippingproduct_category_idsexclude_product_category_idsminimum_amountmaximum_amountcustomer_emails
wp wc coupon create --code=new-coupon --type=percent
wp wc coupon delete <id>...
-
<id>...- The coupon ID to delete.
wp wc coupon delete 123
wp wc coupon delete $(wp wc coupon list --format=ids)
wp wc coupon get <coupon> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<coupon>- Coupon ID or code -
[--field=<field>]- Instead of returning the whole coupon fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the coupon's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idcodetypeamountdescriptionexpiry_dateindividual_useproduct_idsexclude_product_idsusage_limitusage_limit_per_userlimit_usage_to_x_itemsusage_countenable_free_shippingproduct_category_idsexclude_product_category_idsminimum_amountmaximum_amountcustomer_emails
wp wc coupon get 123 --field=discount_type
wp wc coupon get disc50 --format=json > disc50.json
wp wc coupon list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter coupon based on coupon property. -
[--field=<field>]- Prints the value of a single field for each coupon. -
[--fields=<fields>]- Limit the output to specific coupon fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
idcodetypeamountdescriptionexpiry_date
These fields are optionally available:
individual_useproduct_idsexclude_product_idsusage_limitusage_limit_per_userusage_limit_per_userlimit_usage_to_x_itemsusage_countfree_shippingproduct_category_idsexclude_product_category_idsexclude_sale_itemsminimum_amountmaximum_amountcustomer_emails
Fields for filtering query result also available:
-
q- Filter coupons with search query. -
in- Specify coupon IDs to retrieve. -
not_in- Specify coupon IDs NOT to retrieve. -
created_at_min- Filter coupons created after this date. -
created_at_max- Filter coupons created before this date. -
updated_at_min- Filter coupons updated after this date. -
updated_at_max- Filter coupons updated before this date. -
page- Page number. -
offset- Number of coupon to displace or pass over. -
order- Accepted values:ASCandDESC. Default:DESC. -
orderby- Sort retrieved coupons by parameter. One or more options can be passed.
wp wc coupon list
wp wc coupon list --field=id
wp wc coupon list --fields=id,code,type --format=json
wp wc coupon types
wp wc coupon types
wp wc coupon update <coupon> [--<field>=<value>]
-
<coupon>- The ID or code of the coupon to update. -
[--<field>=<value>]- One or more fields to update
codetypeamountdescriptionexpiry_dateindividual_useproduct_idsexclude_product_idsusage_limitusage_limit_per_userlimit_usage_to_x_itemsusage_countenable_free_shippingproduct_category_idsexclude_product_categoriesexclude_product_category_idsminimum_amountmaximum_amountcustomer_emails
wp wc coupon list
wp wc coupon list --field=id
wp wc coupon list --fields=id,code,type --format=json
wp wc customer <command>
wp wc customer create <email> [--<field>=<value>] [--porcelain]
-
<email>- The email address of the customer to create. -
[--<field>=<value>]- Associative args for the new customer. -
[--porcelain]- Outputs just the new customer id.
usernamepasswordfirst_namelast_namebilling_address.first_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phoneshipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
wp wc customer create new-customer@example.com --first_name=Akeda
wp wc customer delete <customer>...
-
<customer>...- The customer ID, email, or username to delete.
wp wc customer delete 123
wp wc customer delete $(wp wc customer list --format=ids)
wp wc customer downloads <customer> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<customer>- The customer ID, email or username. -
[--field=<field>]- Instead of returning the whole customer fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the customer's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
download_iddownload_nameaccess_expires
wp wc customer downloads 123
wp wc customer get <customer> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<customer>- Customer ID, email, or username. -
[--field=<field>]- Instead of returning the whole customer fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the customer's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idemailfirst_namelast_namecreated_atusernamelast_order_idlast_order_dateorders_counttotal_spentavatar_urlbilling_address.first_namebilling_address.last_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phoneshipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
Fields for filtering query result also available:
-
role- Filter customers associated with certain role. -
q- Filter customers with search query. -
created_at_min- Filter customers whose registered after this date. -
created_at_max- Filter customers whose registered before this date. -
limit- The maximum returned number of results. -
offset- Offset the returned results. -
order- Accepted values:ASCandDESC. Default:DESC. -
orderby- Sort retrieved customers by parameter. One or more options can be passed.
wp wc customer get 123 --field=email
wp wc customer get customer-login --format=json
wp wc customer list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter customer based on customer property. -
[--field=<field>]- Prints the value of a single field for each customer. -
[--fields=<fields>]- Limit the output to specific customer fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
idemailfirst_namelast_namecreated_atusernamelast_order_idlast_order_dateorders_counttotal_spentavatar_urlbilling_address.first_namebilling_address.last_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phoneshipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
Fields for filtering query result also available:
-
role- Filter customers associated with certain role. -
q- Filter customers with search query. -
created_at_min- Filter customers whose registered after this date. -
created_at_max- Filter customers whose registered before this date. -
limit- The maximum returned number of results. -
offset- Offset the returned results. -
order- Accepted values:ASCandDESC. Default:DESC. -
orderby- Sort retrieved customers by parameter. One or more options can be passed.
wp wc customer list
wp wc customer list --field=id
wp wc customer list --fields=id,email,first_name --format=json
wp wc customer orders <customer> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<customer>- The customer ID, email or username. -
[--field=<field>]- Instead of returning the whole customer fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the customer's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
For more fields, see List Orders fields.
wp wc customer orders 123
wp wc customer update <customer> [--<field>=<value>]
-
<customer>- Customer ID, email, or username. -
[--<field>=<value>]- One or more fields to update.
emailfirst_namelast_namebilling_address.first_namebilling_address.last_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phoneshipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
wp wc customer update customer-login --first_name=akeda --last_name=bagus
wp wc customer update customer@example.com --password=new-password
wp wc customer update customer@example.com --password=new-password
wp wc order <command>
wp wc order create [--<field>=<value>] [--porcelain]
-
[--<field>=<value>]- Associative args for the new order. -
[--porcelain]- Outputs just the new order id.
Required fields:
customer_id
Optional fields:
statusnotecurrencyorder_meta
Payment detail fields:
payment_details.method_idpayment_details.method_titlepayment_details.paid
Billing address fields:
billing_address.first_namebilling_address.last_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phone
Shipping address fields:
shipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
Line item fields (numeric array, started with index zero):
line_items.0.product_idline_items.0.quantityline_items.0.variations.pa_color
For second line item: line_items.1.product_id and so on.
Shipping line fields (numeric array, started with index zero):
shipping_lines.0.method_idshipping_lines.0.method_titleshipping_lines.0.total
For second shipping item: shipping_lines.1.method_id and so on.
wp wc order create --customer_id=1 --status=pending ...
wp wc order delete <id>...
-
<id>...- The order ID to delete.
wp wc order delete 123
wp wc order get <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<id>- Order ID. -
[--field=<field>]- Instead of returning the whole order fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the order's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idorder_numbercustomer_idtotalstatuscreated_at
For more fields, see List Orders fields.
wp wc order get 123 --fields=id,title,sku
wp wc order list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter orders based on order property. -
[--field=<field>]- Prints the value of a single field for each order. -
[--fields=<fields>]- Limit the output to specific order fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
idorder_numbercustomer_idtotalstatuscreated_at
These fields are optionally available:
updated_atcompleted_atcurrencysubtotaltotal_line_items_quantitytotal_taxtotal_shippingcart_taxshipping_taxtotal_discountshipping_methodsnotecustomer_ipcustomer_user_agentview_order_url
Payment detail fields:
payment_details.method_idpayment_details.method_titlepayment_details.paid
Billing address fields:
billing_address.first_namebilling_address.last_namebilling_address.companybilling_address.address_1billing_address.address_2billing_address.citybilling_address.statebilling_address.postcodebilling_address.countrybilling_address.emailbilling_address.phone
Shipping address fields:
shipping_address.first_nameshipping_address.last_nameshipping_address.companyshipping_address.address_1shipping_address.address_2shipping_address.cityshipping_address.stateshipping_address.postcodeshipping_address.country
Line item fields (numeric array, started with index zero):
line_items.0.product_idline_items.0.quantityline_items.0.variations.pa_color
For second line item: line_items.1.product_id and so on.
Shipping line fields (numeric array, started with index zero):
shipping_lines.0.method_idshipping_lines.0.method_titleshipping_lines.0.total
For second shipping item: shipping_lines.1.method_id and so on.
wp wc order list
wp wc order update <id> [--<field>=<value>]
-
<id>- Product ID -
[--<field>=<value>]- One or more fields to update.
For available fields, see Create an Order fields.
wp wc order update 123 --status=completed
wp wc product <command>
wp wc product create [--<field>=<value>] [--porcelain]
-
[--<field>=<value>]- Associative args for the new product. -
[--porcelain]- Outputs just the new product id.
Required fields:
title
These fields are optionally available for create command:
typestatusdownloadablevirtualskuregular_pricesale_pricesale_price_dates_fromsale_price_dates_totax_statustax_classmanaging_stockstock_quantityin_stockbackorderssold_individuallyfeaturedshipping_classdescriptionenable_html_descriptionshort_descriptionenable_html_short_descriptionreviews_allowedupsell_idscross_sell_idsparent_idcategoriestags
dimensions.lengthdimensions.widthdimensions.heightdimensions.unit
Images is an array in which element can be set by specifying its index:
imagesimages.sizeimages.0.idimages.0.created_atimages.0.updated_atimages.0.srcimages.0.titleimages.0.altimages.0.position
Attributes is an array in which element can be set by specifying its index:
attributesattributes.sizeattributes.0.nameattributes.0.slugattributes.0.positionattributes.0.visibleattributes.0.variationattributes.0.options
Downloads is an array in which element can be accessed by specifying its index:
downloadsdownloads.sizedownloads.0.iddownloads.0.namedownloads.0.file
Variations is an array in which element can be accessed by specifying its index:
variationsvariations.sizevariations.0.idvariations.0.created_atvariations.0.updated_atvariations.0.downloadablevariations.0.virtualvariations.0.permalinkvariations.0.skuvariations.0.pricevariations.0.regular_pricevariations.0.sale_pricevariations.0.sale_price_dates_fromvariations.0.sale_price_dates_tovariations.0.taxablevariations.0.tax_statusvariations.0.tax_classvariations.0.managing_stockvariations.0.stock_quantityvariations.0.in_stockvariations.0.backorderedvariations.0.purchaseablevariations.0.visiblevariations.0.on_salevariations.0.weight-
variations.0.dimensions- See dimensions fields variations.0.shipping_classvariations.0.shipping_class_id-
variations.0.images- See images fields -
variations.0.attributes- See attributes fields -
variations.0.downloads- See downloads fields variations.0.download_limitvariations.0.download_expiry
wp wc product create --title="Product Name"
wp wc product delete <id>...
-
<id>...- The product ID to delete.
wp wc product delete 123
wp wc product delete $(wp wc product list --format=ids)
wp wc product get <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<id>- Product ID. -
[--field=<field>]- Instead of returning the whole product fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the product's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
For more fields, see List Products fields.
wp wc product get 123 --fields=id,title,sku
wp wc product list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter products based on product property. -
[--field=<field>]- Prints the value of a single field for each product. -
[--fields=<fields>]- Limit the output to specific product fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
idtitleskuin_stockpricesale_pricecategoriestagstypecreated_at
These fields are optionally available:
updated_atstatusdownloadablevirtualpermalinkregular_pricesale_price_dates_fromsale_price_dates_toprice_htmltaxabletax_statustax_classmanaging_stockstock_quantitybackorders_allowedbackorderedbackorderssold_individuallypurchaseablefeaturedvisiblecatalog_visibilityon_saleweightshipping_requiredshipping_taxableshipping_classshipping_class_iddescriptionenable_html_descriptionshort_descriptionenable_html_short_descriptionreviews_allowedaverage_ratingrating_countrelated_idsupsell_idscross_sell_idsparent_idfeatured_srcdownload_limitdownload_expirydownload_typepurchase_notetotal_salesparentproduct_urlbutton_text
There are some properties that are nested array. In such case, if array.size is zero then listing the fields with array.0.some_field will results in error that field array.0.some_field does not exists.
dimensions.lengthdimensions.widthdimensions.heightdimensions.unit
Images is an array in which element can be accessed by specifying its index:
imagesimages.sizeimages.0.idimages.0.created_atimages.0.updated_atimages.0.srcimages.0.titleimages.0.altimages.0.position
Attributes is an array in which element can be accessed by specifying its index:
attributesattributes.sizeattributes.0.nameattributes.0.slugattributes.0.positionattributes.0.visibleattributes.0.variationattributes.0.options
Downloads is an array in which element can be accessed by specifying its index:
downloadsdownloads.sizedownloads.0.iddownloads.0.namedownloads.0.file
Variations is an array in which element can be accessed by specifying its index:
variationsvariations.sizevariations.0.idvariations.0.created_atvariations.0.updated_atvariations.0.downloadablevariations.0.virtualvariations.0.permalinkvariations.0.skuvariations.0.pricevariations.0.regular_pricevariations.0.sale_pricevariations.0.sale_price_dates_fromvariations.0.sale_price_dates_tovariations.0.taxablevariations.0.tax_statusvariations.0.tax_classvariations.0.managing_stockvariations.0.stock_quantityvariations.0.in_stockvariations.0.backorderedvariations.0.purchaseablevariations.0.visiblevariations.0.on_salevariations.0.weight-
variations.0.dimensions- See dimensions fields variations.0.shipping_classvariations.0.shipping_class_id-
variations.0.images- See images fields -
variations.0.attributes- See attributes fields -
variations.0.downloads- See downloads fields variations.0.download_limitvariations.0.download_expiry
Fields for filtering query result also available:
-
q- Filter products with search query. -
created_at_min- Filter products whose created after this date. -
created_at_max- Filter products whose created before this date. -
updated_at_min- Filter products whose updated after this date. -
updated_at_max- Filter products whose updated before this date. -
limit- The maximum returned number of results. -
offset- Offset the returned results. -
order- Accepted values:ASCandDESC. Default:DESC. -
orderby- Sort retrieved products by parameter. One or more options can be passed.
wp wc product list
wp wc product list --field=id
wp wc product list --fields=id,title,type --format=json
wp wc product update <id> [--<field>=<value>]
-
<id>- Product ID. -
[--<field>=<value>]- One or more fields to update.
For more fields, see Create a Product fields.
wp wc product update 123 --title="New Product Title" --description="New description"
wp wc product reviews <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<id>- Product ID. -
[--field=<field>]- Instead of returning the whole review fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the review's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idratingreviewer_namereviewer_emailverifiedcreated_at
wp wc product reviews 123
wp wc product reviews 123 --fields=id,rating,reviewer_email
wp wc product types
wp wc product types
wp wc product category get <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<id>- Product category ID. -
[--field=<field>]- Instead of returning the whole product category fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the product category's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idnameslugparentdescriptiondisplayimagecount
wp wc product category get 123
wp wc product category list
-
[--<field>=<value>]- Filter products based on product property. -
[--field=<field>]- Prints the value of a single field for each product. -
[--fields=<fields>]- Limit the output to specific product fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
For more fields, see Get Product Category fields.
wp wc product category list
wp wc product category list --fields=id,name --format=json
wp wc report <command>
wp wc report list [--format=<format>]
-
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
wp wc report list
wp wc report sales [--field=<field>] [--fields=<fields>] [--format=<format>] [--period=<period>] [--date_min] [--date_max] [--limit]
-
[--field=<field>]- Instead of returning the whole report fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the report's fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table. -
[--period=<period>]- The supported periods are: week, month, last_month, and year. If invalid period is supplied, week is used. If period is not specified, the current day is used. -
[--date_min]- Return sales for a specific start date. The date need to be in theYYYY-MM-AAformat. -
[--date_max]- Return sales for a specific end date. The dates need to be in theYYYY-MM-AAformat. -
[--limit]- Limit report result. Default:12.
total_salesaverage_salestotal_orderstotal_itemstotal_taxtotal_shippingtotal_discounttotals_grouped_bytotalstotal_customers
wp wc report sales
wp wc report sales --period=last_month
wp wc report top_sellers [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] [--period=<period>] [--date_min] [--date_max] [--limit]
-
[--<field>=<value>]- Filter report based on report property. -
[--field=<field>]- Prints the value of a single field for each seller. -
[--fields=<fields>]- Limit the output to specific report fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table. -
[--period=<period>]- The supported periods are: week, month, last_month, and year. If invalid period is supplied, week is used. If period is not specified, the current day is used. -
[--date_min]- Return sales for a specific start date. The date need to be in theYYYY-MM-AAformat. -
[--date_max]- Return sales for a specific end date. The dates need to be in theYYYY-MM-AAformat. -
[--limit]- Limit report result. Default:12.
titleproduct_idquantity
wp wc report top_sellers
wp wc report top_sellers --period=last_month
wp wc tax <command>
wp wc tax create [--<field>=<value>] [--porcelain]
-
[--<field>=<value>]- Associative args for the new tax rate. -
[--porcelain]- Outputs just the new tax rate id.
countrystatepostcodecityratenameprioritycompoundshippingclassorder
wp wc tax create --country=US --rate=5 --class=standard --type=percent
wp wc tax create_class [--<field>=<value>] [--porcelain]
-
[--<field>=<value>]- Associative args for the new tax class. -
[--porcelain]- Outputs just the new tax class slug.
name
wp wc tax create_class --name="Reduced Rate"
wp wc tax delete <id>...
-
<id>...- The tax rate ID to delete.
wp wc tax delete 123
wp wc tax delete $(wp wc tax list --format=ids)
wp wc tax delete_class <slug>...
-
<slug>...- The tax class slug to delete.
wp wc tax delete_class reduced-rate
wp wc tax delete_class $(wp wc tax list_class --format=ids)
wp wc tax get <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
-
<id>- Tax rate ID -
[--field=<field>]- Instead of returning the whole tax rate fields, returns the value of a single fields. -
[--fields=<fields>]- Get a specific subset of the tax rates fields. -
[--format=<format>]- Accepted values: table, json, csv. Default: table.
idcountrystatepostcodecityratenameprioritycompoundshippingorderclass
wp wc tax get 123 --field=rate
wp wc tax get 321 --format=json > rate321.json
wp wc tax list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter tax based on tax property. -
[--field=<field>]- Prints the value of a single field for each tax. -
[--fields=<fields>]- Limit the output to specific tax fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
idcountrystatepostcodecityratenameprioritycompoundshippingclass
These fields are optionally available:
order
Fields for filtering query result also available:
-
class- Sort by tax class. -
page- Page number.
wp wc tax list
wp wc tax list --field=id
wp wc tax list --fields=id,rate,class --format=json
wp wc tax list_class [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
-
[--<field>=<value>]- Filter tax class based on tax class property. -
[--field=<field>]- Prints the value of a single field for each tax class. -
[--fields=<fields>]- Limit the output to specific tax class fields. -
[--format=<format>]- Acceptec values: table, csv, json, count, ids. Default: table.
slugname
wp wc tax list_class
wp wc tax list_class --field=slug
wp wc tax list_class --format=json
wp wc tax update <id> [--<field>=<value>]
-
<id>- The ID of the tax rate to update. -
[--<field>=<value>]- One or more fields to update.
countrystatepostcodecityratenameprioritycompoundshippingclass
wp wc tax update 123 --rate=5
wp wc tool <command>
wp wc tool clear_transients
wp wc tool clear_transients
WooCommerce is an open source commerce platform built for WordPress and lovingly crafted by Automattic and the WooCommerce community 💜. Come and work with us!
Contribution
- Set up development environment
- Our Git Flow
- SCSS and JS minification
- Naming conventions
- CSS SASS coding guidelines and naming conventions
- Critical Flows
- API Critical Flows
- String localisation guidelines
- Translating WooCommerce
- Deprecation in core
- Adding Actions and Filters
- Common Issues
- Writing high-quality testing instructions
Release Notes
- Release Testing Instructions
- 3.6.x notes/FAQ
- 2.6.x to 3.0.0 Developer Migration Notes
- Select2 fields not working in 3.0.x
- Thumbnail Image Regeneration in 3.3+
- Customizing image sizes in 3.3+
REST API and CLI
CRUD & Data Descriptions
- Database Description
- CRUD Objects in 3.0
- Order and Order Line Item Data
- Coupon Data
- Customer Data
- Product Data
- Data Stores
Internal APIs
Theming
- Enabling product gallery features (zoom, swipe, lightbox)
- Template File Guidelines for Devs and Theme Authors
Examples / Guides