WordPress at a glance
function is not described

wc_get_account_saved_payment_methods_list_item_cc() WC 2.6

Controls the output for credit cards on the my account page.

No Hooks.

Return

Array. Filtered item.

Usage

wc_get_account_saved_payment_methods_list_item_cc( $item, $payment_token );
$item(array) (required)
Individual list item from woocommerce_saved_payment_methods_list.
$payment_token(WC_Payment_Token) (required)
The payment token associated with this method entry.

Changelog

Since 2.6 Introduced.

Code of wc_get_account_saved_payment_methods_list_item_cc() WC 5.2.2

<?php
function wc_get_account_saved_payment_methods_list_item_cc( $item, $payment_token ) {
	if ( 'cc' !== strtolower( $payment_token->get_type() ) ) {
		return $item;
	}

	$card_type               = $payment_token->get_card_type();
	$item['method']['last4'] = $payment_token->get_last4();
	$item['method']['brand'] = ( ! empty( $card_type ) ? ucfirst( $card_type ) : esc_html__( 'Credit card', 'woocommerce' ) );
	$item['expires']         = $payment_token->get_expiry_month() . '/' . substr( $payment_token->get_expiry_year(), -2 );

	return $item;
}