WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks

BlockTypesController::redirect_to_field() public WC 1.0

Adds a redirect field to the login form so blocks can redirect users after login.

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

No Hooks.

Return

null. Nothing.

Usage

$BlockTypesController = new BlockTypesController();
$BlockTypesController->redirect_to_field();

Code of BlockTypesController::redirect_to_field() WC 5.6.0

public function redirect_to_field() {
	// phpcs:ignore WordPress.Security.NonceVerification
	if ( empty( $_GET['redirect_to'] ) ) {
		return;
	}
	echo '<input type="hidden" name="redirect" value="' . esc_attr( esc_url_raw( wp_unslash( $_GET['redirect_to'] ) ) ) . '" />'; // phpcs:ignore WordPress.Security.NonceVerification
}