3

I am trying to delete an order from database i was tried using bellow function but this is not working.can any body tell me how to delete an order from db using order id.

<?php wc_delete_order_item( absint( $order_id ) ); ?>
9

Orders are just regular posts:

wp_delete_post($order_id,true);

Not the answer you're looking for? Browse other questions tagged or ask your own question.