WooCommerce订单取消无效

hello i have this code

    //define the woocommerce_valid_order_statuses_for_cancel callback 
add_filter( 'woocommerce_valid_order_statuses_for_cancel', 'custom_valid_order_statuses_for_cancel',1, 2 );
 function custom_valid_order_statuses_for_cancel( $statuses, $order ){

     // Set HERE the order statuses where you want the cancel button to appear
     return array_merge( $statuses, array('processing', 'shipped'));
 }

it shows order cancel button when order status is processing or shipped it's great but when i click the cancel button it redirect me to a blank page with this in the url

http://zumra.start-solutions.net/cart/?cancel_order=true&order=wc_order_FfYdoQEcGLvq0&order_id=263&redirect=http%3A%2F%2Fzumra.start-solutions.net%2Fmy-account%2F&_wpnonce=f2297a934b

and the order doesn't cancel any ideas what i am doing wrong ?

EDIT 1: i opened the network tab and i get Status Code: 500 Internal Server Error when i click the cancel button what's causing this problem?

EDIT 2 : i tried deactivating all the plugins except woocommerce but still doesn't work