Automattic\WooCommerce\Internal\Admin\Orders

PageController::prepare_order_edit_form()privateWC 8.1.0

Prepares the order edit form for creating or editing an order.

Method of the class: PageController{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->prepare_order_edit_form(): void;

Notes

  • See: \Automattic\WooCommerce\Internal\Admin\Orders\Edit.

Changelog

Since 8.1.0 Introduced.

PageController::prepare_order_edit_form() code WC 9.5.1

private function prepare_order_edit_form(): void {
	if ( ! $this->order || ! in_array( $this->current_action, array( 'new_order', 'edit_order' ), true ) ) {
		return;
	}

	$this->order_edit_form = $this->order_edit_form ?? new Edit();
	$this->order_edit_form->setup( $this->order );
	$this->order_edit_form->set_current_action( $this->current_action );
}