woocommerce_shipping_rate_cost filter-hookWC 3.2.0

Get rate cost.

Usage

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
-

Changelog

Since 3.2.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.