woocommerce_saved_payment_methods_list хук-фильтрWC 2.6.0

Get customer saved payment methods list.

Использование

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
-

Список изменений

С версии 2.6.0 Введена.

Где вызывается хук

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

Где используется хук в WooCommerce

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