woocommerce_valid_order_statuses_for_cancel хук-фильтрWC 1.0

Использование

add_filter( 'woocommerce_valid_order_statuses_for_cancel', 'wp_kama_woocommerce_valid_order_statuses_for_cancel_filter', 10, 2 );
function wp_kama_woocommerce_valid_order_statuses_for_cancel_filter( $array, $order ){
	// filter...

	return $array;
}
$array
-
$order
-

Где вызывается хук

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 ) ) {

Где используется хук в WooCommerce

Использование не найдено.