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.
code
type
amount
description
expiry_date
individual_use
product_ids
exclude_product_ids
usage_limit
usage_limit_per_user
limit_usage_to_x_items
usage_count
enable_free_shipping
product_category_ids
exclude_product_category_ids
minimum_amount
maximum_amount
customer_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.
id
code
type
amount
description
expiry_date
individual_use
product_ids
exclude_product_ids
usage_limit
usage_limit_per_user
limit_usage_to_x_items
usage_count
enable_free_shipping
product_category_ids
exclude_product_category_ids
minimum_amount
maximum_amount
customer_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.
id
code
type
amount
description
expiry_date
These fields are optionally available:
individual_use
product_ids
exclude_product_ids
usage_limit
usage_limit_per_user
usage_limit_per_user
limit_usage_to_x_items
usage_count
free_shipping
product_category_ids
exclude_product_category_ids
exclude_sale_items
minimum_amount
maximum_amount
customer_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:ASC
andDESC
. 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
code
type
amount
description
expiry_date
individual_use
product_ids
exclude_product_ids
usage_limit
usage_limit_per_user
limit_usage_to_x_items
usage_count
enable_free_shipping
product_category_ids
exclude_product_categories
exclude_product_category_ids
minimum_amount
maximum_amount
customer_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.
username
password
first_name
last_name
billing_address.first_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_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_id
download_name
access_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.
id
email
first_name
last_name
created_at
username
last_order_id
last_order_date
orders_count
total_spent
avatar_url
billing_address.first_name
billing_address.last_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_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:ASC
andDESC
. 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.
id
email
first_name
last_name
created_at
username
last_order_id
last_order_date
orders_count
total_spent
avatar_url
billing_address.first_name
billing_address.last_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_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:ASC
andDESC
. 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.
email
first_name
last_name
billing_address.first_name
billing_address.last_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_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:
status
note
currency
order_meta
Payment detail fields:
payment_details.method_id
payment_details.method_title
payment_details.paid
Billing address fields:
billing_address.first_name
billing_address.last_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
Shipping address fields:
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_address.country
Line item fields (numeric array, started with index zero):
line_items.0.product_id
line_items.0.quantity
line_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_id
shipping_lines.0.method_title
shipping_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.
id
order_number
customer_id
total
status
created_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.
id
order_number
customer_id
total
status
created_at
These fields are optionally available:
updated_at
completed_at
currency
subtotal
total_line_items_quantity
total_tax
total_shipping
cart_tax
shipping_tax
total_discount
shipping_methods
note
customer_ip
customer_user_agent
view_order_url
Payment detail fields:
payment_details.method_id
payment_details.method_title
payment_details.paid
Billing address fields:
billing_address.first_name
billing_address.last_name
billing_address.company
billing_address.address_1
billing_address.address_2
billing_address.city
billing_address.state
billing_address.postcode
billing_address.country
billing_address.email
billing_address.phone
Shipping address fields:
shipping_address.first_name
shipping_address.last_name
shipping_address.company
shipping_address.address_1
shipping_address.address_2
shipping_address.city
shipping_address.state
shipping_address.postcode
shipping_address.country
Line item fields (numeric array, started with index zero):
line_items.0.product_id
line_items.0.quantity
line_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_id
shipping_lines.0.method_title
shipping_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:
type
status
downloadable
virtual
sku
regular_price
sale_price
sale_price_dates_from
sale_price_dates_to
tax_status
tax_class
managing_stock
stock_quantity
in_stock
backorders
sold_individually
featured
shipping_class
description
enable_html_description
short_description
enable_html_short_description
reviews_allowed
upsell_ids
cross_sell_ids
parent_id
categories
tags
dimensions.length
dimensions.width
dimensions.height
dimensions.unit
Images is an array in which element can be set by specifying its index:
images
images.size
images.0.id
images.0.created_at
images.0.updated_at
images.0.src
images.0.title
images.0.alt
images.0.position
Attributes is an array in which element can be set by specifying its index:
attributes
attributes.size
attributes.0.name
attributes.0.slug
attributes.0.position
attributes.0.visible
attributes.0.variation
attributes.0.options
Downloads is an array in which element can be accessed by specifying its index:
downloads
downloads.size
downloads.0.id
downloads.0.name
downloads.0.file
Variations is an array in which element can be accessed by specifying its index:
variations
variations.size
variations.0.id
variations.0.created_at
variations.0.updated_at
variations.0.downloadable
variations.0.virtual
variations.0.permalink
variations.0.sku
variations.0.price
variations.0.regular_price
variations.0.sale_price
variations.0.sale_price_dates_from
variations.0.sale_price_dates_to
variations.0.taxable
variations.0.tax_status
variations.0.tax_class
variations.0.managing_stock
variations.0.stock_quantity
variations.0.in_stock
variations.0.backordered
variations.0.purchaseable
variations.0.visible
variations.0.on_sale
variations.0.weight
-
variations.0.dimensions
- See dimensions fields variations.0.shipping_class
variations.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_limit
variations.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.
id
title
sku
in_stock
price
sale_price
categories
tags
type
created_at
These fields are optionally available:
updated_at
status
downloadable
virtual
permalink
regular_price
sale_price_dates_from
sale_price_dates_to
price_html
taxable
tax_status
tax_class
managing_stock
stock_quantity
backorders_allowed
backordered
backorders
sold_individually
purchaseable
featured
visible
catalog_visibility
on_sale
weight
shipping_required
shipping_taxable
shipping_class
shipping_class_id
description
enable_html_description
short_description
enable_html_short_description
reviews_allowed
average_rating
rating_count
related_ids
upsell_ids
cross_sell_ids
parent_id
featured_src
download_limit
download_expiry
download_type
purchase_note
total_sales
parent
product_url
button_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.length
dimensions.width
dimensions.height
dimensions.unit
Images is an array in which element can be accessed by specifying its index:
images
images.size
images.0.id
images.0.created_at
images.0.updated_at
images.0.src
images.0.title
images.0.alt
images.0.position
Attributes is an array in which element can be accessed by specifying its index:
attributes
attributes.size
attributes.0.name
attributes.0.slug
attributes.0.position
attributes.0.visible
attributes.0.variation
attributes.0.options
Downloads is an array in which element can be accessed by specifying its index:
downloads
downloads.size
downloads.0.id
downloads.0.name
downloads.0.file
Variations is an array in which element can be accessed by specifying its index:
variations
variations.size
variations.0.id
variations.0.created_at
variations.0.updated_at
variations.0.downloadable
variations.0.virtual
variations.0.permalink
variations.0.sku
variations.0.price
variations.0.regular_price
variations.0.sale_price
variations.0.sale_price_dates_from
variations.0.sale_price_dates_to
variations.0.taxable
variations.0.tax_status
variations.0.tax_class
variations.0.managing_stock
variations.0.stock_quantity
variations.0.in_stock
variations.0.backordered
variations.0.purchaseable
variations.0.visible
variations.0.on_sale
variations.0.weight
-
variations.0.dimensions
- See dimensions fields variations.0.shipping_class
variations.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_limit
variations.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:ASC
andDESC
. 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.
id
rating
reviewer_name
reviewer_email
verified
created_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.
id
name
slug
parent
description
display
image
count
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-AA
format. -
[--date_max]
- Return sales for a specific end date. The dates need to be in theYYYY-MM-AA
format. -
[--limit]
- Limit report result. Default:12
.
total_sales
average_sales
total_orders
total_items
total_tax
total_shipping
total_discount
totals_grouped_by
totals
total_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-AA
format. -
[--date_max]
- Return sales for a specific end date. The dates need to be in theYYYY-MM-AA
format. -
[--limit]
- Limit report result. Default:12
.
title
product_id
quantity
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.
country
state
postcode
city
rate
name
priority
compound
shipping
class
order
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.
id
country
state
postcode
city
rate
name
priority
compound
shipping
order
class
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.
id
country
state
postcode
city
rate
name
priority
compound
shipping
class
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.
slug
name
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.
country
state
postcode
city
rate
name
priority
compound
shipping
class
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