Delete all Product Variations Using REST API
Recently I have found this question on the internet and since I was doing exactly the same when developing WooCommerce functionality for my crossposting plugin, I decided to create a small guide for you.
The long story short we will need two REST API requests here:
- To get all variations of a specific product,
- To delete all of them in a single batch request.
I think the most clear way here would be to create a function for that, let’s say for example rudr_delete_all_variations() or something.