Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wc-order-refund.php 1 location

@@ 180-190 (lines=11) @@
177
	 * @param int $id (default: 0).
178
	 * @return bool
179
	 */
180
	public function get_refund( $id = 0 ) {
181
		_deprecated_function( 'get_refund', '2.7', 'read' );
182
		if ( ! $id ) {
183
			return false;
184
		}
185
		if ( $result = get_post( $id ) ) {
186
			$this->populate( $result );
187
			return true;
188
		}
189
		return false;
190
	}
191
}
192

includes/abstracts/abstract-wc-legacy-order.php 1 location

@@ 499-509 (lines=11) @@
496
	 * @param int $id (default: 0).
497
	 * @return bool
498
	 */
499
	public function get_order( $id = 0 ) {
500
		_deprecated_function( 'get_order', '2.7', 'read' );
501
		if ( ! $id ) {
502
			return false;
503
		}
504
		if ( $result = get_post( $id ) ) {
505
			$this->populate( $result );
506
			return true;
507
		}
508
		return false;
509
	}
510
511
	/**
512
	 * Populates an order from the loaded post data.