woocommerce_shipping_rate_label хук-фильтрWC 1.0

Get rate label.

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

add_filter( 'woocommerce_shipping_rate_label', 'wp_kama_woocommerce_shipping_rate_label_filter', 10, 2 );

/**
 * Function for `woocommerce_shipping_rate_label` filter-hook.
 * 
 * @param  $data_label 
 * @param  $that       
 *
 * @return 
 */
function wp_kama_woocommerce_shipping_rate_label_filter( $data_label, $that ){

	// filter...
	return $data_label;
}
$data_label
-
$that
-

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

WC_Shipping_Rate::get_label()
woocommerce_shipping_rate_label
woocommerce/includes/class-wc-shipping-rate.php 203
return apply_filters( 'woocommerce_shipping_rate_label', $this->data['label'], $this );

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

woocommerce/includes/wc-core-functions.php 43
add_filter( 'woocommerce_shipping_rate_label', 'sanitize_text_field' ); // Shipping rate label.