Title: W3S API Extension for Woocommerce
Author: w3specialists.com
Published: <strong>2. Juna 2025.</strong>
Last modified: 20. Augusta 2026.

---

Pretražite dodatke

![](https://ps.w.org/w3s-api-extension/assets/icon-256x256.png?rev=3304946)

# W3S API Extension for Woocommerce

 Od [w3specialists.com](https://profiles.wordpress.org/w3specialists/)

[Skini](https://downloads.wordpress.org/plugin/w3s-api-extension.1.1.0.zip)

 * [Detalji](https://bs.wordpress.org/plugins/w3s-api-extension/#description)
 * [Recenzije](https://bs.wordpress.org/plugins/w3s-api-extension/#reviews)
 *  [Instalacija](https://bs.wordpress.org/plugins/w3s-api-extension/#installation)
 * [Razvoj](https://bs.wordpress.org/plugins/w3s-api-extension/#developers)

 [Podrška](https://wordpress.org/support/plugin/w3s-api-extension/)

## Opis

Enhances your store’s REST API by adding powerful, flexible endpoints.
 Stay tuned
more are coming!

**Add or Remove a Single Category**

Easily append or remove one category at a time—by numeric ID or slug—using simple
POST/PUT/PATCH or DELETE requests to
 /wp-json/wc/v3/products/{product_id}/categories/{
identifier}

**Batch Manage Multiple Categories**

In a single call, add or remove multiple categories at once via JSON payloads to
/
wp-json/wc/v3/products/{product_id}/categories Supply an array of IDs or slugs under
the “categories” key to update your product’s category list in bulk.

**Automatic Slug Resolution**
 Pass slugs like “summer-collection” — or non-Latin
slugs such as “ανδρικά” — and the plugin will resolve them to the correct WooCommerce
term IDs on the fly—no extra lookups required.

**Non-Destructive Updates**
 Neither endpoint touches other product data. Categories
are merged or pruned transparently without overwriting prices, stock, attributes,
or any other fields.

**Plays Well With WooCommerce**
 Changes are saved through the WooCommerce product
API, so product caches are refreshed, `woocommerce_update_product` runs, `product.
updated` webhooks fire, and the store’s default category is applied if a product
is left without one.

Built-In Validation & Security

Sanitization of all inputs (IDs and slugs) to guard against bad data; the batch 
payload is validated against a schema.

Permission checks mirror WooCommerce core: only users allowed to edit the product(
Shop Manager, Admin) can modify its categories.

Clear, standardized error codes (w3s_api_extension_invalid_product and w3s_api_extension_invalid_product_category)
for consistent API responses. Unknown category IDs and slugs both return 404.

W3S API Extension for WooCommerce installs alongside the core WooCommerce REST API,
requires no additional configuration, and works out of the box.

### Endpoints Documentation

**Product Categories**

 *  Add a single category
    - **Type:** HTTP request
    - **Endpoint:** `/wp-json/wc/v3/products/{product_id}/categories/{identifier}`
    - **Methods:** POST, PUT, PATCH
    - **Examples:**
       curl -X PUT https://example.com/wp-json/wc/v3/products/125/
      categories/18 \ -u consumer_key:consumer_secret curl -X PUT https://example.
      com/wp-json/wc/v3/products/125/categories/my-category \ -u consumer_key:consumer_secret
 *  Remove a single category
    - **Type:** HTTP request
    - **Endpoint:** `/wp-json/wc/v3/products/{product_id}/categories/{identifier}`
    - **Methods:** DELETE
    - **Examples:**
       curl -X DELETE https://example.com/wp-json/wc/v3/products/125/
      categories/18 \ -u consumer_key:consumer_secret curl -X DELETE https://example.
      com/wp-json/wc/v3/products/125/categories/my-category \ -u consumer_key:consumer_secret
 *  Batch add categories
    - **Type:** HTTP request
    - **Endpoint:** `/wp-json/wc/v3/products/{product_id}/categories`
    - **Methods:** POST, PUT, PATCH
    - **Example:**
       curl -X PUT https://example.com/wp-json/wc/v3/products/125/categories\-
      u consumer_key:consumer_secret \ -H “Content-Type: application/json” \ -d ‘{“
      categories”: [1,”my-category”,3,”my-category-1”]}’
 *  Batch delete categories
    - **Type:** HTTP request
    - **Endpoint:** `/wp-json/wc/v3/products/{product_id}/categories`
    - **Methods:** DELETE
    - **Example:**
       curl -X DELETE https://example.com/wp-json/wc/v3/products/125/
      categories \ -u consumer_key:consumer_secret \ -H “Content-Type: application/
      json” \ -d ‘{“categories”: [1,”my-category”,3,”my-category-1”]}’

**Extra notes**

 *  Strings that include only digits are parsed as IDs, everything else as a slug.
   Slugs may contain any characters except “/”; URL-encode them when needed (the
   batch endpoint takes them in the JSON body, so no encoding is required there).
 *  The batch endpoints also accept form-encoded `categories[]=…` parameters or 
   a comma-separated string. An empty or missing list returns a standard 400 `rest_missing_callback_param`/`
   rest_invalid_param` error.
 *  Removing a product’s last category assigns the store’s default category (“Uncategorized”),
   exactly as WooCommerce does in the admin.
 *  Every response is the product’s resulting list of category terms.

## Instalacija

 1. Upload the `w3s-api-extension` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress. WooCommerce must be
    installed and active.
 3. No further configuration is required; the endpoints are available immediately.

## Recenzije

Nema recenzija za ovaj dodatak.

## Saradnici i programeri

“W3S API Extension for Woocommerce” is open source software. The following people
have contributed to this plugin.

Doprinositelji

 *   [ w3specialists.com ](https://profiles.wordpress.org/w3specialists/)

[Prevedi “W3S API Extension for Woocommerce” na vaš jezik.](https://translate.wordpress.org/projects/wp-plugins/w3s-api-extension)

### Zainteresirani za razvoj?

[Pregledajte kôd](https://plugins.trac.wordpress.org/browser/w3s-api-extension/),
pogledajte [SVN spremište](https://plugins.svn.wordpress.org/w3s-api-extension/)
ili se pretplatite na [dnevnik razvoja](https://plugins.trac.wordpress.org/log/w3s-api-extension/)
od [RSS](https://plugins.trac.wordpress.org/log/w3s-api-extension/?limit=100&mode=stop_on_copy&format=rss).

## Zapis promijena

#### 1.1.0

 * Compatibility: tested with WordPress 7.1 and WooCommerce 11.0. Now requires WordPress
   6.7+ and WooCommerce 9.0+.
 * Changed: category updates go through the WooCommerce product CRUD (`set_category_ids()`/`
   save()`). WooCommerce's product object cache (on by default for new stores since
   WooCommerce 11.0) is invalidated, and `woocommerce_update_product` and `product.
   updated` webhooks now fire.
 * Fixed: numeric category IDs that do not exist (or belong to another taxonomy)
   now return 404 instead of silently succeeding.
 * Added: the single-category endpoints accept any slug, including non-Latin (e.
   g. Greek) slugs.
 * Added: the batch `categories` parameter is declared in the route schema; form-
   encoded and comma-separated values are accepted and invalid payloads return standard
   400 errors.
 * Added: item schema for API discovery (OPTIONS requests).
 * Changed: permission checks mirror WooCommerce core (`wc_rest_check_post_permissions`),
   honouring the `woocommerce_rest_check_permissions` filter.
 * Fixed: routes are no longer registered when WooCommerce is inactive (previously
   a fatal error on request).
 * Removed: unnecessary rewrite-rule flush on activation/deactivation.

#### 1.0.1

 * Fixed: readme file modifications

#### 1.0.0

 * Initial release

## Meta

 *  Version **1.1.0**
 *  Last updated **prije 1 sedmica**
 *  Active installations **Manje od 10**
 *  WordPress version ** 6.7 ili viša **
 *  Tested up to **7.1**
 *  PHP version ** 7.4 ili viša **
 *  Language
 * [English (US)](https://wordpress.org/plugins/w3s-api-extension/)
 * Tags
 * [api](https://bs.wordpress.org/plugins/tags/api/)[categories](https://bs.wordpress.org/plugins/tags/categories/)
   [extension](https://bs.wordpress.org/plugins/tags/extension/)[woocommerce](https://bs.wordpress.org/plugins/tags/woocommerce/)
 *  [Napredni pogled](https://bs.wordpress.org/plugins/w3s-api-extension/advanced/)

## Ocjene

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/w3s-api-extension/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/w3s-api-extension/reviews/)

## Doprinositelji

 *   [ w3specialists.com ](https://profiles.wordpress.org/w3specialists/)

## Podrška

Imate nešto za reći? Trebate pomoć?

 [Pogledaj forum podrške](https://wordpress.org/support/plugin/w3s-api-extension/)