WordPress at Your Fingertips
function is not described

WC_Order_Refund::get_refund() public WC 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.

{} It's a 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 3.0

Code of WC_Order_Refund::get_refund() WC 5.8.0

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

	if ( ! $id ) {
		return false;
	}

	$result = get_post( $id );

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

	return false;
}