WC_Order_Refund::__get( string $key )

Magic __get method for backwards compatibility.


Description Description


Parameters Parameters

$key

(Required) Value to get.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/class-wc-order-refund.php

	public function __get( $key ) {
		wc_doing_it_wrong( $key, 'Refund properties should not be accessed directly.', '3.0' );
		/**
		 * 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 );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.