wc_get_customer_last_order( int $customer_id )
Get info about customer’s last order.
Description Description
Parameters Parameters
- $customer_id
-
(Required) Customer ID.
Return Return
(WC_Order|bool) Order object if successful or false.
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(); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |