wc_get_customer_last_order( int $customer_id )

Get info about customer’s last order.


Description Description


Parameters Parameters

$customer_id

(Required) Customer ID.


Top ↑

Return Return

(WC_Order|bool) Order object if successful or false.


Top ↑

Source Source

File: includes/wc-user-functions.php

function wc_get_customer_last_order( $customer_id ) {
	$customer = new WC_Customer( $customer_id );

	return $customer->get_last_order();
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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