Create and Update Products with WooCommerce API
Recently I was publishing and updating the tutorials about WordPress REST API, how to create a post, how to add a featured image and so on. But did you know that WooCommerce has its own API which is build on the base of a regular WordPress REST API but allows to do much more things and also simplifies the work with the other ones.
In this tutorial we are going to dive into actual examples of working with WooCommerce API, I will show examples of creating and updating products, and also we will try to search them by SKU and delete them.
One more thing – I am a big fan of using WordPress HTTP functions like
wp_remote_request(), so we are going to use them below. So no additional steps are needed like installation of a PHP library or anything else.