WC_Order_Refund::get_refund()publicWC 1.0

Deprecated from version 3.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Gets an refund from the database.

Method of the class: WC_Order_Refund{}

No Hooks.

Return

true|false.

Usage

$WC_Order_Refund = new WC_Order_Refund();
$WC_Order_Refund->get_refund( $id );
$id(int)
-
Default: 0)

Changelog

Deprecated since 3.0

WC_Order_Refund::get_refund() code WC 8.7.0

public function get_refund( $id = 0 ) {
	wc_deprecated_function( 'get_refund', '3.0', 'read' );

	if ( ! $id ) {
		return false;
	}

	$result = wc_get_order( $id );

	if ( $result ) {
		$this->populate( $result );
		return true;
	}

	return false;
}