I'm trying to hook a function to the order deletion (when permanently delete is clicked from admin page) but for some reason the function isn't called. My code looks something like
add_action('woocommerce_before_delete_order_item', function($id) {
$order = new WC_Order($id);
//do some stuff with order meta data
}, 10, 1);
I tried to throw and exception inside the function but no error occurred. Can somebody help?
via Chebli Mohamed
Looking for woocommerce Rest API Integration for your online store? Hire our developers & programmers for your custom API and extensions. +91-9806724185 or Contact@expresstechsoftwares.com
RépondreSupprimer