OK, I have the try/catch working, so that the 404 is being handled. Now still, is there any way I can force an ID onto a new category?
Same would be preferable for products, customers, etc.
To illustrate:
$result = $wca->get(‘products/categories/9’); // would work fine (if 9 would exist)
$result = $wca->get(‘products/categories/109’); // would give a 404 woocommerce_rest_term_invalid
How can I make the system ignore this, and simply hand me an object or a false (for example).
Secundary question; is it possible (with this API) to insert an item WITH an ID. So actually I’d like to force an ID for products, categories, etc.