woocommerce_get_credit_card_type_label
Fallback to title case, uppercasing the first letter of each word.
Использование
add_filter( 'woocommerce_get_credit_card_type_label', 'wp_kama_woocommerce_get_credit_card_type_label_filter' );
/**
* Function for `woocommerce_get_credit_card_type_label` filter-hook.
*
* @param $labels[ $type ]
*
* @return
*/
function wp_kama_woocommerce_get_credit_card_type_label_filter( $labels[ $type ] ){
// filter...
return $labels[ $type ];
}
- $labels[ $type ]
- -
Список изменений
| С версии 8.9.0 | Введена. |
Где вызывается хук
woocommerce_get_credit_card_type_label
woocommerce/includes/wc-core-functions.php 1497
return apply_filters( 'woocommerce_get_credit_card_type_label', ( array_key_exists( $type, $labels ) ? $labels[ $type ] : ucwords( $type ) ) );