Automattic\WooCommerce\Internal\Admin\Orders

PageController::get_edit_url()publicWC 1.0

Helper method to generate edit link for an order.

{} It's a method of the class: PageController{}

No Hooks.

Return

String. Edit link.

Usage

$PageController = new PageController();
$PageController->get_edit_url( $order_id ) : string;
$order_id(int) (required)
Order ID.

Code of PageController::get_edit_url() WC 7.1.0

public function get_edit_url( int $order_id ) : string {
	return wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() ?
		admin_url( 'admin.php?page=wc-orders&id=' . absint( $order_id ) ) . '&action=edit' :
		admin_url( 'post.php?post=' . absint( $order_id ) ) . '&action=edit';
}