WC_Order::is_editable()publicWC 1.0

Checks if an order can be edited, specifically for use on the Edit Order screen.

Method of the class: WC_Order{}

Hooks from the method

Return

true|false.

Usage

$WC_Order = new WC_Order();
$WC_Order->is_editable();

WC_Order::is_editable() code WC 9.6.1

public function is_editable() {
	/**
	 * Filter to check if an order is editable.
	 *
	 * @param bool     $is_editable Is the order editable.
	 * @param WC_Order $this        Order object.
	 * @since 2.7.0
	 */
	return apply_filters( 'wc_order_is_editable', in_array( $this->get_status(), array( OrderStatus::PENDING, OrderStatus::ON_HOLD, OrderStatus::AUTO_DRAFT ), true ), $this );
}