woocommerce_shipping_rate_cost хук-фильтрWC 3.2.0

Get rate cost.

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

add_filter( 'woocommerce_shipping_rate_cost', 'wp_kama_woocommerce_shipping_rate_cost_filter', 10, 2 );

/**
 * Function for `woocommerce_shipping_rate_cost` filter-hook.
 * 
 * @param  $data_cost 
 * @param  $that      
 *
 * @return 
 */
function wp_kama_woocommerce_shipping_rate_cost_filter( $data_cost, $that ){

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

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

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

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

WC_Shipping_Rate::get_cost()
woocommerce_shipping_rate_cost
woocommerce/includes/class-wc-shipping-rate.php 213
return apply_filters( 'woocommerce_shipping_rate_cost', $this->data['cost'], $this );

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

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