WooCommerce Code Reference

Search results

WC_Order_Factory

Order factory class

Table of Contents

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

Methods

get_order()

Get order.

public static get_order( [ $order_id : mixed = false ] ) : WC_Order|bool
Parameters
$order_id : mixed = false

(default: false) Order ID to get.

Return values
WC_Order|bool

get_order_id()

Get the order ID depending on what was passed.

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

Order data to convert to an ID.

Tags
since
Return values
int|bool

false on failure

Back to the top