Warning: This method has been deprecated.

WC_Abstract_Legacy_Order::get_order( int $id )

Gets an order from the database.


Description Description


Parameters Parameters

$id

(Required) (default: 0).


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/legacy/abstract-wc-legacy-order.php

	public function get_order( $id = 0 ) {
		wc_deprecated_function( 'WC_Order::get_order', '3.0' );

		if ( ! $id ) {
			return false;
		}

		$result = get_post( $id );

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

		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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