Woocommerce when deleting a product, automatically also delete the product gallery and product image

I was trying the following:

when a product page gets deleted (permanently), it should also delete the:
product gallery and product image which are attached to the post.

I tried the solution i found on:
http://wordpress.stackexchange.com/questions/109793/delete-associated-media-upon-page-deletion

But it didn’t work out for me.

Read more here: Woocommerce when deleting a product, automatically also delete the product gallery and product image

Leave a Reply

Your email address will not be published. Required fields are marked *