WC_Payment_Tokens::get_token_type_by_id()public staticWC 2.6.0

Returns what type (credit card, echeck, etc) of token a token is by ID.

Method of the class: WC_Payment_Tokens{}

No Hooks.

Return

String. Type.

Usage

$result = WC_Payment_Tokens::get_token_type_by_id( $token_id );
$token_id(int) (required)
Token ID.

Changelog

Since 2.6.0 Introduced.

WC_Payment_Tokens::get_token_type_by_id() code WC 8.7.0

public static function get_token_type_by_id( $token_id ) {
	$data_store = WC_Data_Store::load( 'payment-token' );
	return $data_store->get_token_type_by_id( $token_id );
}