Automattic\WooCommerce\Internal\CustomerEmailVerification

VerificationController::print_result_notice │ public │ WC 11.0.0

Print the one-off result notice carried by the {@see self::NOTICE_PARAM} query arg, if any.

Send/confirm actions redirect here with a result code rather than queuing a session notice, so the page shows exactly the current request's outcome — re-running an action can't stack notices.

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

Хуков нет.

Возвращает

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

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

$VerificationController = new VerificationController();
$VerificationController->print_result_notice(): void;

Список изменений

С версии 11.0.0 Введена.

Код VerificationController::print_result_notice() WC 11.2.2

public function print_result_notice(): void {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- display-only, no state change.
	$code   = isset( $_GET[ self::NOTICE_PARAM ] ) ? sanitize_key( wp_unslash( $_GET[ self::NOTICE_PARAM ] ) ) : '';
	$notice = $this->result_notice( $code );

	if ( null !== $notice ) {
		wc_print_notice( esc_html( $notice[0] ), $notice[1] );
	}
}