Automattic\WooCommerce\StoreApi\Schemas\V1
CartShippingRateSchema::get_rate_prop()
Gets a prop of the rate object, if callable.
Method of the class: CartShippingRateSchema{}
No Hooks.
Return
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_rate_prop( $rate, $prop );
- $rate(WC_Shipping_Rate) (required)
- Rate object.
- $prop(string) (required)
- Prop name.
CartShippingRateSchema::get_rate_prop() CartShippingRateSchema::get rate prop code WC 9.5.1
protected function get_rate_prop( $rate, $prop ) { $getter = 'get_' . $prop; return \is_callable( array( $rate, $getter ) ) ? $rate->$getter() : ''; }