woocommerce_shipping_rate_id
Get ID for the rate. This is usually a combination of the method and instance IDs.
Использование
add_filter( 'woocommerce_shipping_rate_id', 'wp_kama_woocommerce_shipping_rate_id_filter', 10, 2 ); /** * Function for `woocommerce_shipping_rate_id` filter-hook. * * @param $data_id * @param $that * * @return */ function wp_kama_woocommerce_shipping_rate_id_filter( $data_id, $that ){ // filter... return $data_id; }
- $data_id
- -
- $that
- -
Список изменений
С версии 3.2.0 | Введена. |
Где вызывается хук
woocommerce_shipping_rate_id
woocommerce/includes/class-wc-shipping-rate.php 174
return apply_filters( 'woocommerce_shipping_rate_id', $this->data['id'], $this );