Automattic\WooCommerce\Internal\OrderWithdrawal

OrderWithdrawalController::is_endpoint_request │ public │ WC 11.1.0

Whether the current My Account request is for the public order withdrawal endpoint.

Method of the class: OrderWithdrawalController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$OrderWithdrawalController = new OrderWithdrawalController();
$OrderWithdrawalController->is_endpoint_request(): bool;

Changelog

Since 11.1.0 Introduced.

OrderWithdrawalController::is_endpoint_request() code WC 11.2.1

public function is_endpoint_request(): bool {
	global $wp;

	return $this->is_enabled()
		&& isset( $wp->query_vars[ self::ENDPOINT_KEY ] )
		&& self::ENDPOINT_KEY === WC()->query->get_current_endpoint();
}