Automattic\WooCommerce\Internal\OrderReviews

Endpoint::render │ public │ WC 1.0

Render the Review Order body directly. Public so unit tests can drive the rendering path without staging a global request and the rewrite.

Метод класса: Endpoint{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$Endpoint = new Endpoint();
$Endpoint->render( $order_id ): void;
$order_id(int) (обязательный)
Order id parsed from the URL.

Код Endpoint::render() WC 11.2.2

public function render( int $order_id ): void {
	$order_key = $this->read_order_key();
	$order     = $order_id ? wc_get_order( $order_id ) : false;

	if ( ! $this->is_authorised( $order, $order_key ) ) {
		$this->render_404();
		return;
	}

	if ( $order instanceof WC_Order ) {
		$this->maybe_mark_no_actionable_rows( $order );
	}

	wc_get_template( 'order/customer-review-order.php', array( 'order' => $order ) );
}