WC_Payment_Token::get_user_id()
Returns the user ID associated with the token or false if this token is not associated.
Method of the class: WC_Payment_Token{}
No Hooks.
Return
Int
. User ID if this token is associated with a user or 0 if no user is associated
Usage
$WC_Payment_Token = new WC_Payment_Token(); $WC_Payment_Token->get_user_id( $context );
- $context(string)
- In what context to execute this.
Default: 'view'
Changelog
Since 2.6.0 | Introduced. |
WC_Payment_Token::get_user_id() WC Payment Token::get user id code WC 8.7.0
public function get_user_id( $context = 'view' ) { return $this->get_prop( 'user_id', $context ); }