wc_get_customer_last_order()
Get info about customer's last order.
Хуков нет.
Возвращает
WC_Order|true|false
. Order object if successful or false.
Использование
wc_get_customer_last_order( $customer_id );
- $customer_id(int) (обязательный)
- Customer ID.
Список изменений
С версии 2.6.0 | Введена. |
Код wc_get_customer_last_order() wc get customer last order WC 9.8.2
function wc_get_customer_last_order( $customer_id ) { $customer = new WC_Customer( $customer_id ); return $customer->get_last_order(); }