woocommerce_valid_order_statuses_for_cancel filter-hookWC 1.0

Usage

add_filter( 'woocommerce_valid_order_statuses_for_cancel', 'wp_kama_woocommerce_valid_order_statuses_for_cancel_filter', 10, 2 );

/**
 * Function for `woocommerce_valid_order_statuses_for_cancel` filter-hook.
 * 
 * @param  $array 
 * @param  $order 
 *
 * @return 
 */
function wp_kama_woocommerce_valid_order_statuses_for_cancel_filter( $array, $order ){

	// filter...
	return $array;
}
$array
-
$order
-

Where the hook is called

WC_Form_Handler::cancel_order()
woocommerce_valid_order_statuses_for_cancel
wc_get_account_orders_actions()
woocommerce_valid_order_statuses_for_cancel
woocommerce/includes/class-wc-form-handler.php 739
$order_can_cancel = $order->has_status( apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) );
woocommerce/includes/wc-account-functions.php 298
if ( ! in_array( $order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ), true ) ) {

Where the hook is used in WooCommerce

Usage not found.