shopp_customer_registration

This action is called at the beginning of the customer registration process.

add_action('shopp_customer_registration', [callback] );

@param Customer $Customer The Customer account object.

Description

This action is called at the beginning of the customer registration process. The Customer object is passed to the the callback function as a parameter.

Note: The customer record is not saved at this point so ‘$Customer->id’ is not available. Consider using the shopp_customer_registered action if adding data based on a Customer ID.

Example

// This example shows how this action might be used to update
// the customer's type from a registration form.

add_action('shopp_customer_registration', 'shopp_customer_registration_function');

function shopp_customer_registration_function ( $Customer ) {
  $ctype = sanitize_text_field($_POST['customer-typeselect']);
  if ($ctype) {
    $updates = array('type' => $ctype,);
    $Customer->updates($updates);
  }
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar