Wp wc product attribute term list

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

wp wc product_attribute_term_list: Show all terms per taxonomy, with attribute_id being the ID of a product attribute taxonomy.

$ wp help wc product_attribute_term list

NAME

  wp wc product_attribute_term list

DESCRIPTION

  List all items.

SYNOPSIS

  wp wc product_attribute_term list <attribute_id> [--attribute_id=<attribute_id>] [--context=<context>]
  [--page=<page>] [--per_page=<per_page>] [--search=<search>] [--exclude=<exclude>] [--include=<include>]
  [--offset=<offset>] [--order=<order>] [--orderby=<orderby>] [--hide_empty=<hide_empty>] [--parent=<parent>]
  [--product=<product>] [--slug=<slug>] [--fields=<fields>] [--field=<field>] [--format=<format>]

OPTIONS

  <attribute_id>
    Attribute ID.

  [--attribute_id=<attribute_id>]
    Unique identifier for the attribute of the terms.

  [--context=<context>]
    Scope under which the request is made; determines fields present in response.

  [--page=<page>]
    Current page of the collection.

  [--per_page=<per_page>]
    Maximum number of items to be returned in result set.

  [--search=<search>]
    Limit results to those matching a string.

  [--exclude=<exclude>]
    Ensure result set excludes specific IDs.

  [--include=<include>]
    Limit result set to specific ids.

  [--offset=<offset>]
    Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.

  [--order=<order>]
    Order sort attribute ascending or descending.

  [--orderby=<orderby>]
    Sort collection by resource attribute.

  [--hide_empty=<hide_empty>]
    Whether to hide resources not assigned to any products.

  [--parent=<parent>]
    Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.

  [--product=<product>]
    Limit result set to resources assigned to a specific product.

  [--slug=<slug>]
    Limit result set to resources with a specific slug.

  [--fields=<fields>]
    Limit response to specific fields. Defaults to all fields.

  [--field=<field>]
    Get the value of an individual field.

  [--format=<format>]
    Render response in a particular format.
    ---
    default: table
    options:
      - table
      - json
      - csv
      - ids
      - yaml
      - count
      - headers
      - body
      - envelope
    ---

Examples

Just

wp wc product_attribute_term list
</code>

does nothing: A product attribute taxonomy ID is compulsory. Retrieve those with

Voorbeeld (taxonomy 29):

<pre>
wp wc product_attribute_term list 29 --user=4


+-------+------------------+------------------+---------------------------------+------------+-------+
| id    | name             | slug             | description                     | menu_order | count |
+-------+------------------+------------------+---------------------------------+------------+-------+
| 45244 | Alternator       | alternator       | Alle widgets voor alternators   | 0          | 12    |
| 34601 | Blazer           | blazer           | Alle widgers voor Blazer        | 0          | 26    |
| 45246 | Boorhamer        | boorhamer        | Alle widgets voor boorhamers    | 0          | 0     |
| 34582 | Boormachine      | boormachine      | Alle widgets - Boormachine      | 0          | 2929  |
+-------+------------------+------------------+---------------------------------+------------+-------+

See also