WC_Payment_Tokens::delete
Remove a payment token from the database by ID.
Method of the class: WC_Payment_Tokens{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Payment_Tokens::delete( $token_id );
- $token_id(int) (required)
- Token ID.
Changelog
| Since 2.6.0 | Introduced. |
WC_Payment_Tokens::delete() WC Payment Tokens::delete code WC 10.8.1
public static function delete( $token_id ) {
$type = self::get_token_type_by_id( $token_id );
if ( ! empty( $type ) ) {
$class = self::get_token_classname( $type );
$token = new $class( $token_id );
$token->delete();
}
}