WC_Admin_List_Table_Orders::prepare_row_data()protectedWC 1.0

Pre-fetch any data for the row each column has access to it. the_order global is there for bw compat.

Method of the class: WC_Admin_List_Table_Orders{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->prepare_row_data( $post_id );
$post_id(int) (required)
Post ID being shown.

WC_Admin_List_Table_Orders::prepare_row_data() code WC 8.7.0

protected function prepare_row_data( $post_id ) {
	global $the_order;

	if ( empty( $this->object ) || $this->object->get_id() !== $post_id ) {
		$this->object = wc_get_order( $post_id );
		$the_order    = $this->object;
	}
}