woocommerce_get_customer_payment_tokens_limit
Controls the maximum number of Payment Methods that will be listed via the My Account page.
Usage
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.
Changelog
Since 7.2.0 | Introduced. |
Where the hook is called
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' ) ),