shopp_recent_customer_orders()

retrieve orders for a specified time range in the past for a particular customer

shopp_recent_customer_orders ( $customer, $time, $period )

@param int $customer (required) the customer id to load the orders for
@param int $time number of time units (period) to go back
@param string $period the time period, can be days, weeks, months, years.
@return array of Purchase objects

Description

retrieve orders for a specified time range in the past for a particular customer

Examples

Retrieve orders for customer associated with WordPress user JohnDoe for the last day

$orders = shopp_recent_customer_orders ( 
    shopp_customer('JohnDoe', 'wpuser'), 
    1, 
    'day' 
);

Retrieve orders for customer JohnDoe@domain.com for the last 2 weeks

$orders = shopp_recent_customer_orders ( 
    shopp_customer('JohnDoe@domain.com', 'email'), 
    2, 
    'weeks' 
);

Retrieve orders for customer 10 for the last 3 months

$orders = shopp_recent_customer_orders ( 
    10, 
    3, 
    'months' 
);

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar