Automattic\WooCommerce\Internal\PushNotifications\Entities

PushToken::set_originpublicWC 10.4.0

Sets the origin.

Method of the class: PushToken{}

No Hooks.

Returns

null. Nothing (null).

Usage

$PushToken = new PushToken();
$PushToken->set_origin( $origin ): void;
$origin(string) (required)
The origin of the token, e.g. the app it came from.

Changelog

Since 10.4.0 Introduced.

PushToken::set_origin() code WC 10.5.0

public function set_origin( string $origin ): void {
	if ( ! in_array( $origin, self::ORIGINS, true ) ) {
		throw new InvalidArgumentException( 'Origin for PushToken is invalid.' );
	}

	$this->origin = $origin;
}