get a customer object.

shopp_customer ( $customer, $key )

@param int $customer (optional default:false) customer id, WordPress user associated customer, email address associated with customer, or false to load the current global customer object
@param string $key (optional default:customer) customer for lookup by customer id, wpuser to lookup by WordPress user, or email to lookup by email address
@return mixed, stdClass representation of the customer, bool false on failure


get a customer object.


Get the current customer.

$Customer = shopp_customer();

Lookup customer by WordPress account. Only a valid option for WordPress integrated Shopp accounts.

// Get User using get_user_by() WordPress function
$User = get_user_by('login', 'myusername');

// get customer by WordPress user ID
$Customer = shopp_customer($User->ID, 'wpuser');

Lookup customer by email address associated with a Shopp account.

// get customer by email address
$Customer = shopp_customer('', 'email');

Lookup customer by the customer id

// get customer by customer id
$Customer = shopp_customer(10);

See Also

You must be logged in to post a comment.

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