woocommerce_get_credit_card_type_label filter-hookWC 8.9.0

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

wc_get_credit_card_type_label()
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 ) ) );

Where the hook is used in WooCommerce

Usage not found.