woocommerce_shipping_method_add_rate
Usage
add_filter( 'woocommerce_shipping_method_add_rate', 'wp_kama_woocommerce_shipping_method_add_rate_filter', 10, 3 ); /** * Function for `woocommerce_shipping_method_add_rate` filter-hook. * * @param $rate * @param $args * @param $that * * @return */ function wp_kama_woocommerce_shipping_method_add_rate_filter( $rate, $args, $that ){ // filter... return $rate; }
- $rate
- -
- $args
- -
- $that
- -
Where the hook is called
woocommerce_shipping_method_add_rate
woocommerce/includes/abstracts/abstract-wc-shipping-method.php 350
$this->rates[ $args['id'] ] = apply_filters( 'woocommerce_shipping_method_add_rate', $rate, $args, $this );