WC_Shipping_Method::get_rate_id()
Returns a rate ID based on this methods ID and instance, with an optional suffix if distinguishing between multiple rates.
Метод класса: WC_Shipping_Method{}
Хуков нет.
Возвращает
Строку
.
Использование
$WC_Shipping_Method = new WC_Shipping_Method(); $WC_Shipping_Method->get_rate_id( $suffix );
- $suffix(строка)
- Suffix.
По умолчанию: ''
Список изменений
С версии 2.6.0 | Введена. |
Код WC_Shipping_Method::get_rate_id() WC Shipping Method::get rate id WC 9.7.1
public function get_rate_id( $suffix = '' ) { $rate_id = array( $this->id ); if ( $this->instance_id ) { $rate_id[] = $this->instance_id; } if ( $suffix ) { $rate_id[] = $suffix; } return implode( ':', $rate_id ); }