WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::__set() 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

null. Nothing.

Usage

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->__set( $key, $value );
$key(string) (required)
Key.
$value(mixed) (required)
Value.

Changelog

Since 3.2.0 Introduced.

Code of WC_Shipping_Rate::__set() WC 5.7.0

public function __set( $key, $value ) {
	if ( is_callable( array( $this, "set_{$key}" ) ) ) {
		$this->{"set_{$key}"}( $value );
	} else {
		$this->data[ $key ] = $value;
	}
}