WC_Payment_Token_Data_Store::get_token_type_by_id( int $token_id )
Get a token’s type by ID.
Description Description
Parameters Parameters
- $token_id
-
(Required) Token ID.
Return Return
(string)
Source Source
File: includes/data-stores/class-wc-payment-token-data-store.php
public function get_token_type_by_id( $token_id ) {
global $wpdb;
return $wpdb->get_var(
$wpdb->prepare(
"SELECT type FROM {$wpdb->prefix}woocommerce_payment_tokens WHERE token_id = %d",
$token_id
)
);
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |