WC_Shipping_Rate::get_method_id
Get shipping method ID the rate belongs to.
Method of the class: WC_Shipping_Rate{}
Hooks from the method
Returns
String.
Usage
$WC_Shipping_Rate = new WC_Shipping_Rate(); $WC_Shipping_Rate->get_method_id();
Changelog
| Since 3.2.0 | Introduced. |
WC_Shipping_Rate::get_method_id() WC Shipping Rate::get method id code WC 10.5.0
public function get_method_id() {
/**
* Filter the shipping method ID.
*
* @since 3.2.0
* @param string $method_id The shipping method ID.
* @param WC_Shipping_Rate $this The shipping rate object.
*/
return apply_filters( 'woocommerce_shipping_rate_method_id', $this->data['method_id'], $this );
}