/**
 * Controls the output for eChecks on the my account page.
 *
 * @since 2.6
 * @param  array             $item         Individual list item from woocommerce_saved_payment_methods_list
 * @param  WC_Payment_Token $payment_token The payment token associated with this method entry
 * @return array                           Filtered item
 */
function wc_get_account_saved_payment_methods_list_item_echeck($item, $payment_token)
{
    if ('echeck' !== strtolower($payment_token->get_type())) {
        return $item;
    }
    $item['method']['last4'] = $payment_token->get_last4();
    $item['method']['brand'] = esc_html__('eCheck', 'woocommerce');
    return $item;
}