WC_Payment_Token::get_user_id()publicWC 2.6.0

Returns the user ID associated with the token or false if this token is not associated.

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

Хуков нет.


int. User ID if this token is associated with a user or 0 if no user is associated


$WC_Payment_Token = new WC_Payment_Token();
$WC_Payment_Token->get_user_id( $context );
In what context to execute this.
По умолчанию: 'view'

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

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

Код WC_Payment_Token::get_user_id() WC 7.3.0

public function get_user_id( $context = 'view' ) {
	return $this->get_prop( 'user_id', $context );