Automattic\WooCommerce\Internal\StockNotifications\Frontend

SignupResult{}WC 1.0

A class for representing the result of a signup.

No Hooks.

Usage

$SignupResult = new SignupResult();
// use class methods

Methods

  1. public __construct( string $code, ?Notification $notification = null )
  2. public get_code()
  3. public get_notification()

SignupResult{} code WC 10.3.6

class SignupResult {

	/**
	 * The signup code.
	 *
	 * @var string
	 */
	private string $code;

	/**
	 * The notification.
	 *
	 * @var Notification|null
	 */
	private ?Notification $notification;

	/**
	 * Constructor.
	 *
	 * @param string            $code The signup code.
	 * @param Notification|null $notification The notification.
	 */
	public function __construct( string $code, ?Notification $notification = null ) {
		$this->code         = $code;
		$this->notification = $notification;
	}

	/**
	 * Get the signup code.
	 *
	 * @return string
	 */
	public function get_code(): string {
		return $this->code;
	}

	/**
	 * Get the notification.
	 *
	 * @return Notification|null
	 */
	public function get_notification(): ?Notification {
		return $this->notification;
	}
}