Order API Reference

General-use functions for creating and retrieving orders.

// Creates a new, blank APP_Order object.
// Retrieves the APP_Order object for a particular order id.
appthemes_get_order( $order_id );


Methods available on any instance of APP_Order.

// General Information
$order->get_ip_address(); // Returns IP address used to create the order
$order->get_parent(); // Used for recurring orders
$order->is_recurring(); // Returns true if the order is recurring
$order->is_escrow(); // Returns true if the order is an escrow order
// Payment Gateway helpers
$order->get_return_url(); // URL to redirect after order is completed
$order->get_cancel_url(); // URL to redirect to change gateways
// Items
$order->get_item( $index = 0 ); // Returns the nth-item on the order
$order->get_items( $item_type = '' ); // Returns an array of items
$order->add_item( $item_type, $price, $post_id );
$order->refresh_total(); // Updates the total based on the database
// Event
$order->get_status(); // Returns the current state of the order. See Order States
// Gateways
$order->set_gateway( $gateway_id );


Methods available only on instances of APP_Instant_Order for instant payment orders.


Methods available only on instances of APP_Escrow_Order for escrow payment orders.

Popular Add-ons

Cardinity Payment Gateway

Accept bank cards safely and securely, supporting High-Risk Activities on…



Taxable plugin allows you create a customizable Tax rates and Sale…


Simply Hired Publisher

A Simply Hired aggregator that publishes job listings on your site.