Home › Forums › WoodMart support forum › Cancel order in account settings › Reply To: Cancel order in account settings
August 23, 2023 at 2:23 pm
#490732
Aizaz Imtiaz Awan
Keymaster
Hello,
Try to add the below code to the functions.php file in your child theme.
add_filter('woocommerce_valid_order_statuses_for_cancel', 'my_cancellable_statuses', 10, 2);
function my_cancellable_statuses($statuses, $order){
return array('pending', 'processing', 'on-hold');
}
Best Regards.