woocommerce_get_credit_card_type_label
Fallback to title case, uppercasing the first letter of each word.
Usage
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 ]
- -
Changelog
Since 8.9.0 | Introduced. |
Where the hook is called
woocommerce_get_credit_card_type_label
woocommerce/includes/wc-core-functions.php 1578
return apply_filters( 'woocommerce_get_credit_card_type_label', ( array_key_exists( $type, $labels ) ? $labels[ $type ] : ucwords( $type ) ) );