wc_get_account_saved_payment_methods_list_item_echeck()WC 2.6

Controls the output for eChecks on the my account page.

No Hooks.

Return

Array. Filtered item.

Usage

wc_get_account_saved_payment_methods_list_item_echeck( $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.

wc_get_account_saved_payment_methods_list_item_echeck() code WC 9.4.2

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;
}