woocommerce_shipping_rate_description
Filter the shipping rate description.
Usage
add_filter( 'woocommerce_shipping_rate_description', 'wp_kama_woocommerce_shipping_rate_description_filter', 10, 2 );
/**
* Function for `woocommerce_shipping_rate_description` filter-hook.
*
* @param string $description The current description.
* @param WC_Shipping_Rate $that The shipping rate.
*
* @return string
*/
function wp_kama_woocommerce_shipping_rate_description_filter( $description, $that ){
// filter...
return $description;
}
- $description(string)
- The current description.
- $that(WC_Shipping_Rate)
- The shipping rate.
Changelog
| Since 9.2.0 | Introduced. |
Where the hook is called
woocommerce_shipping_rate_description
woocommerce/includes/class-wc-shipping-rate.php 371
return apply_filters( 'woocommerce_shipping_rate_description', $this->data['description'], $this );