wc_get_customer_last_order()
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. |
wc_get_customer_last_order() wc get customer last order code WC 9.4.2
function wc_get_customer_last_order( $customer_id ) { $customer = new WC_Customer( $customer_id ); return $customer->get_last_order(); }