woocommerce_get_customer_payment_tokens_limit хук-фильтрWC 7.2.0

Controls the maximum number of Payment Methods that will be listed via the My Account page.

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

add_filter( 'woocommerce_get_customer_payment_tokens_limit', 'wp_kama_woocommerce_get_customer_payment_tokens_limit_filter' );

/**
 * Function for `woocommerce_get_customer_payment_tokens_limit` filter-hook.
 * 
 * @param int $limit Defaults to the value of the `posts_per_page` option.
 *
 * @return int
 */
function wp_kama_woocommerce_get_customer_payment_tokens_limit_filter( $limit ){

	// filter...
	return $limit;
}
$limit(int)
Defaults to the value of the posts_per_page option.

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

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

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

WC_Payment_Tokens::get_customer_tokens()
woocommerce_get_customer_payment_tokens_limit
woocommerce/includes/class-wc-payment-tokens.php 84
'limit'      => apply_filters( 'woocommerce_get_customer_payment_tokens_limit', get_option( 'posts_per_page' ) ),

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

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