wc_order_is_editable filter-hookWC 2.7.0

Filter to check if an order is editable.

Usage

add_filter( 'wc_order_is_editable', 'wp_kama_wc_order_is_editable_filter', 10, 2 );

/**
 * Function for `wc_order_is_editable` filter-hook.
 * 
 * @param bool     $is_editable Is the order editable.
 * @param WC_Order $that        Order object.
 *
 * @return bool
 */
function wp_kama_wc_order_is_editable_filter( $is_editable, $that ){

	// filter...
	return $is_editable;
}
$is_editable(true|false)
Is the order editable.
$that(WC_Order)
Order object.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

WC_Order::is_editable()
wc_order_is_editable
woocommerce/includes/class-wc-order.php 1656
return apply_filters( 'wc_order_is_editable', in_array( $this->get_status(), array( OrderStatus::PENDING, OrderStatus::ON_HOLD, OrderStatus::AUTO_DRAFT ), true ), $this );

Where the hook is used in WooCommerce

Usage not found.