WordPress at a glance
function is not described

wc_get_customer_last_order() WC 2.6.0

Get info about customer's last order.

No Hooks.

Return

WC_Order|true|false. Order object if successful or false.

Usage

wc_get_customer_last_order( $customer_id );
$customer_id(int) (required)
Customer ID.

Changelog

Since 2.6.0 Introduced.

Code of wc_get_customer_last_order() WC 5.3.0

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

	return $customer->get_last_order();
}