woocommerce_payment_gateway_get_new_payment_method_option_html_label хук-фильтрWC 2.6.0

Filter the saved payment method label.

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

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 string             $label Label.
 * @param WC_Payment_Gateway $that  Payment gateway instance.
 *
 * @return string
 */
function wp_kama_woocommerce_payment_gateway_get_new_method_option_html_label_filter( $label, $that ){

	// filter...
	return $label;
}
$label(строка)
Label.
$that(WC_Payment_Gateway)
Payment gateway instance.

Список изменений

С версии 2.6.0 Введена.

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

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 612
$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 );

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

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