vae_customer()

Use the vae_customer() function to retrieve information about a customer by customer ID.

Usage

vae_customer($id, $load = false)

  • $id - ID of the customer to retrieve. You may pass a Vae customer ID, an E-Mail address, or a Stripe gateway customer ID. (If support for additional payment gateways would be useful to you, Pull Requests are welcome.)

  • $load - set to true to load this customer as the active customer.

Returns

Returns a PHP associative array containing information about that customer.

If you are using Vae’s recurring subscription management feature, you will find information about their active subscriptions in the array key called subscriptions.

Their addresses are stored in the array key customer_addresses.

Sample Usage

<?php
// Fetch a customer by ID
$customer = vae_customer($_REQUEST['customer_id']);
echo $customer['name'];
?>