shopp_validate_address

filters the validation status of the Address being added to a customer in the shopp_add_customer_address() dev api call.

add_filter( 'shopp_validate_address', [callback] )

@param bool $valid the validation status of the Address being added to a customer in the shopp_add_customer_address() dev api call.
@param Address $Address the Address object of the address being validated

Description

filters the validation status of the Address being added to a customer in the shopp_add_customer_address() dev api call.

Example

// register filter callback
add_filter('shopp_validate_address', 'shopp_validate_address_fltr', 10, 2);

// create filter function
function my_filter( $valid, $Address ) {
    // say I have a validation function address_valiator()
    // for instance, that implements the USPS AddressValidateRequest API
    $valid = address_validator($Address);

    return $valid;
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar