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.
WooCommerce Bookings: prices by date and forced dates (optional)
The Bookings endpoints need the commercial
WooCommerce Bookings plugin (tested with versions 3.13 and 3.16). They are active only while WooCommerce Bookings is active; without it they are not registered, nothing is scheduled and the plugin works exactly as before.
- Read a bookable product: person types (in sort order, with their position, costs and limits), display cost, cost rules, availability, and the price periods and forced dates stored by this plugin.
- Price periods: store per-person-type prices for date ranges. A booking is priced with the period that covers its booked date; everything else in the WooCommerce Bookings calculation (base and block costs, cost rules, resources, add-ons) stays as it is. The person types' own costs follow the period in effect today, updated once a day. A period can carry its own display ("Now") price; without one the display price can follow the first person type's price. Optionally removes date-range multiplier cost rules.
- Date overrides: force single dates open or closed, whatever the product's default availability and other rules say. They are written as ordinary WooCommerce Bookings availability rules at the top of the product's list; the product's own rules are left untouched.
- Changes are saved through the WooCommerce Bookings product API, so person types, the product price and the WooCommerce Bookings availability caches are updated exactly as for an admin save.