# WooCommerce: tulajdonságok és változatok

> A wc-attributes kategória 17 képessége: globális tulajdonságok és értékeik, termék-tulajdonságok, változatok létrehozása és generálása.

Az ability-nevek előtagja `site-manager/`. A **Címke** úgy áll itt, ahogy a WordPress mutatja: angolul. A kötelező bemenet **félkövér**. Az „összetett bemenet” teljes sémáját a képesség leírása adja (`GET /wp-json/wp-abilities/v1/abilities/site-manager/<név>`). A hívás módja: [Hívás REST-en](https://hub.hellowp.io/hu/docs/lw-plugins/lw-site-manager/rest-api/hivas/).

A WooCommerce-képességek csak aktív WooCommerce mellett léteznek, és a WooCommerce saját jogosultságait kérik. A kockázatos műveletek külön megerősítést várnak: [Biztonsági kapuk](https://hub.hellowp.io/hu/docs/lw-plugins/lw-site-manager/rest-api/biztonsagi-kapuk/).

## Globális tulajdonságok

| Ability | Címke | HTTP | Típus | Jogosultság | Bemenet |
|---|---|---|---|---|---|
| `wc-list-attributes` | List Global Attributes | GET | olvasó | `manage_product_terms` | nincs |
| `wc-get-attribute` | Get Global Attribute | GET | olvasó | `manage_product_terms` | `id`, `slug` |
| `wc-create-attribute` | Create Global Attribute | POST | író | `manage_product_terms` | **`name`**, `slug`, `type`, `order_by`, `has_archives` |
| `wc-update-attribute` | Update Global Attribute | POST | író | `manage_product_terms` | `id`, `slug`, `name`, `type`, `order_by`, `has_archives` |
| `wc-delete-attribute` | Delete Global Attribute | POST | romboló | `manage_product_terms` | `id`, `slug` |
| `wc-list-attribute-terms` | List Attribute Terms | GET | olvasó | `manage_product_terms` | `id`, `slug`, `search`, `hide_empty`, `limit`, `offset` |
| `wc-create-attribute-term` | Create Attribute Term | POST | író | `edit_product_terms` | `id`, `slug`, **`name`**, `description` |
| `wc-update-attribute-term` | Update Attribute Term | POST | író | `edit_product_terms` | `id`, `slug`, **`term_id`**, `name`, `description` |
| `wc-delete-attribute-term` | Delete Attribute Term | POST | romboló | `delete_product_terms` | `id`, `slug`, **`term_id`** |

## Termék-tulajdonságok

| Ability | Címke | HTTP | Típus | Jogosultság | Bemenet |
|---|---|---|---|---|---|
| `wc-add-product-attribute` | Add Product Attribute | POST | író | `edit_products` vagy `manage_woocommerce` | **`product_id`**, **`name`**, `options`, `position`, `visible`, `variation` |
| `wc-set-product-attributes` | Set Product Attributes | POST | író | `edit_products` vagy `manage_woocommerce` | **`product_id`**, **`attributes`** |
| `wc-remove-product-attribute` | Remove Product Attribute | POST | romboló | `edit_products` vagy `manage_woocommerce` | **`product_id`**, **`name`** |

## Változatok

| Ability | Címke | HTTP | Típus | Jogosultság | Bemenet |
|---|---|---|---|---|---|
| `wc-create-variation` | Create Variation | POST | író | `publish_products` | összetett bemenet; kötelező: **`product_id`**, **`attributes`** |
| `wc-update-variation` | Update Variation | POST | író | `edit_products` vagy `manage_woocommerce` | összetett bemenet; kötelező: **`id`** |
| `wc-delete-variation` | Delete Variation | POST | romboló | `delete_products` | **`id`**, `force`, `confirm_delete` |
| `wc-generate-variations` | Generate Variations | POST | író | `publish_products` | **`product_id`**, `default_price` |
| `wc-set-default-variation` | Set Default Variation | POST | író | `edit_products` vagy `manage_woocommerce` | **`product_id`**, `attributes`, `variation_id`, `clear` |
