woocommerce_saved_payment_methods_list filter-hookWC 2.6.0

Get customer saved payment methods list.

Usage

add_filter( 'woocommerce_saved_payment_methods_list', 'wp_kama_woocommerce_saved_payment_methods_list_filter' );

/**
 * Function for `woocommerce_saved_payment_methods_list` filter-hook.
 * 
 * @param  $customer_id 
 *
 * @return 
 */
function wp_kama_woocommerce_saved_payment_methods_list_filter( $customer_id ){

	// filter...
	return $customer_id;
}
$customer_id
-

Changelog

Since 2.6.0 Introduced.

Where the hook is called

wc_get_customer_saved_methods_list()
woocommerce_saved_payment_methods_list
woocommerce/includes/wc-user-functions.php 850
return apply_filters( 'woocommerce_saved_payment_methods_list', array(), $customer_id );

Where the hook is used in WooCommerce

woocommerce/includes/wc-account-functions.php 379
add_filter( 'woocommerce_saved_payment_methods_list', 'wc_get_account_saved_payment_methods_list', 10, 2 );