woocommerce_payment_token_class
Filter payment token class per type.
Использование
add_filter( 'woocommerce_payment_token_class', 'wp_kama_woocommerce_payment_token_class_filter', 10, 2 ); /** * Function for `woocommerce_payment_token_class` filter-hook. * * @param string $class Payment token class. * @param string $type Token type. * * @return string */ function wp_kama_woocommerce_payment_token_class_filter( $class, $type ){ // filter... return $class; }
- $class(строка)
- Payment token class.
- $type(строка)
- Token type.
Список изменений
С версии 3.8.0 | Введена. |
Где вызывается хук
woocommerce_payment_token_class
woocommerce/includes/class-wc-payment-tokens.php 240
return apply_filters( 'woocommerce_payment_token_class', 'WC_Payment_Token_' . $type, $type );