woocommerce_payment_gateway_get_new_payment_method_option_html_label filter-hookWC 2.6.0

Displays a radio button for entering a new payment method (new CC details) instead of using a saved method. Only displayed when a gateway supports tokenization.

Usage

add_filter( 'woocommerce_payment_gateway_get_new_payment_method_option_html_label', 'wp_kama_woocommerce_payment_gateway_get_new_method_option_html_label_filter', 10, 2 );

/**
 * Function for `woocommerce_payment_gateway_get_new_payment_method_option_html_label` filter-hook.
 * 
 * @param  $this->new_method_label 
 * @param  $that                   
 *
 * @return 
 */
function wp_kama_woocommerce_payment_gateway_get_new_method_option_html_label_filter( $this->new_method_label, $that ){

	// filter...
	return $this->new_method_label;
}
$this->new_method_label
-
$that
-

Changelog

Since 2.6.0 Introduced.

Where the hook is called

WC_Payment_Gateway::get_new_payment_method_option_html()
woocommerce_payment_gateway_get_new_payment_method_option_html_label
woocommerce/includes/abstracts/abstract-wc-payment-gateway.php 521
$label = apply_filters( 'woocommerce_payment_gateway_get_new_payment_method_option_html_label', $this->new_method_label ? $this->new_method_label : __( 'Use a new payment method', 'woocommerce' ), $this );

Where the hook is used in WooCommerce

Usage not found.