woocommerce_payment_token_class хук-фильтрWC 3.8.0

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 Введена.

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

WC_Payment_Tokens::get_token_classname()
woocommerce_payment_token_class
woocommerce/includes/class-wc-payment-tokens.php 240
return apply_filters( 'woocommerce_payment_token_class', 'WC_Payment_Token_' . $type, $type );

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

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