WC_Order_Refund::__get PHP Method

__get() public method

Magic __get method for backwards compatibility.
public __get ( string $key ) : mixed
$key string
return mixed
    public function __get($key)
    {
        wc_doing_it_wrong($key, 'Refund properties should not be accessed directly.', '2.7');
        /**
         * Maps legacy vars to new getters.
         */
        if ('reason' === $key) {
            return $this->get_reason();
        } elseif ('refund_amount' === $key) {
            return $this->get_amount();
        }
        return parent::__get($key);
    }