WooCommerce Code Reference

WC_Order_Factory
in package

Order factory class

Table of Contents

get_order()  : WC_Order|bool
Get order.
get_order_id()  : int|bool
Get the order ID depending on what was passed.
get_order_item()  : WC_Order_Item|false
Get order item.

Methods

get_order_id()

Get the order ID depending on what was passed.

public static get_order_id(mixed $order) : int|bool
Parameters
$order : mixed

Order data to convert to an ID.

Tags
since
3.0.0
Return values
int|boolfalse on failure