Wp wc product cat update: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Regel 91: | Regel 91: | ||
+-------------+------------------------------+ | +-------------+------------------------------+ | ||
</pre> | </pre> | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | * [[Wp wc product cat get]] |
Huidige versie van 3 nov 2022 om 22:56
Bewerk een bestaande taxon uit de product_cat
-taxonomie. Geef met een flag aan wat de nieuwe waarde van het betreffende attribuut wordt.
$ wp help wc product_cat update NAME wp wc product_cat update DESCRIPTION Update an existing item. SYNOPSIS wp wc product_cat update <id> [--id=<id>] [--name=<name>] [--slug=<slug>] [--parent=<parent>] [--description=<description>] [--display=<display>] [--image=<image>] [--menu_order=<menu_order>] [--porcelain] OPTIONS <id> The ID for the resource. [--id=<id>] Unique identifier for the resource. [--name=<name>] Category name. [--slug=<slug>] An alphanumeric identifier for the resource unique to its type. [--parent=<parent>] The ID for the parent of the resource. [--description=<description>] HTML description of the resource. [--display=<display>] Category archive display type. [--image=<image>] Image data. [--menu_order=<menu_order>] Menu order, used to custom sort the resource. [--porcelain] Output just the id when the operation is successful.
Simpel voorbeeld
$ wp wc product_cat --user=4 get 44274 +-------------+------------------------------+ | Field | Value | +-------------+------------------------------+ | id | 44274 | | name | Alberka | | slug | Alberka | | parent | 0 | | description | Alle widgets voor Alberka | | display | default | | image | null | | menu_order | 79 | | count | 8 | +-------------+------------------------------+ $ wp wc product_cat --user=4 update 44274 --description="All widgets for Alberka" Success: Updated product_cat 44274. $ wp wc product_cat --user=4 get 44274 +-------------+------------------------------+ | Field | Value | +-------------+------------------------------+ | id | 44274 | | name | Alberka | | slug | Alberka | | parent | 0 | | description | All widgets for Alberka | | display | default | | image | null | | menu_order | 79 | | count | 8 | +-------------+------------------------------+