WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::__get() public WC 3.2.0

Magic methods to support direct access to props.

{} It's a method of the class: WC_Shipping_Rate{}

No Hooks.

Return

Mixed.

Usage

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->__get( $key );
$key(string) (required)
Key.

Changelog

Since 3.2.0 Introduced.

Code of WC_Shipping_Rate::__get() WC 5.6.0

public function __get( $key ) {
	if ( is_callable( array( $this, "get_{$key}" ) ) ) {
		return $this->{"get_{$key}"}();
	} elseif ( isset( $this->data[ $key ] ) ) {
		return $this->data[ $key ];
	} else {
		return '';
	}
}