want to add “cancel order” button but with this code in functon.php doesnt work “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’);
}”
Unfortunately, there is no such option in our theme by default. There is no quick way to change it without additional customization in files and we don’t have an instruction for this which is out of our basic support scope.