Acquaint

Setting up an import from Acquaint

This page contains information specific to Acquaint. For a general guide on setting up a property import please see our 'Creating your first property import' guide.

When creating a property import from Acquaint you'll be presented with the following fields:

XML URL(s) - You will need to obtain your XML(s) URL directly from Acquaint.

Please note that if you have multiple offices, Acquaint will provide an individual URL for each office.

You can use a comma separated list to add these to the field titled 'XML URL' or alternatively you can create an individual import for each office.

Developer hooks

Hook name: propertyhive_pre_import_properties_acquaint_xml

Hook type: Action

Description: Executed after the properties are parsed but before they are actually imported.

Example usage:

add_action( 'propertyhive_pre_import_properties_acquaint_xml', 'pre_import' );
function pre_import( $properties )
{
     // $properties (array) - Array of SimpleXML objects containing property data sent by Acquaint

    // do something here...
}

Hook name: propertyhive_acquaint_xml_properties_due_import

Hook type: Filter

Description: Executed after the properties are parsed but before actually being imported. Allows you to filter out any properties you don't want to import.

For example, maybe you want to only import properties belonging to a certain office.

Example usage:

add_filter( 'propertyhive_acquaint_xml_properties_due_import', 'filter_properties' );
function filter_properties( $properties )
{
    // $properties (array) - Array of SimpleXML objects containing property data sent by Acquaint

    $new_properties = array();
    
    foreach ($properties as $property)
    {
        if ( isset($property->branch) && (string)$property->branch== '12345' )
        {
            $new_properties[] = $property;
        }
    }
    return $new_properties;
}

Hook name: propertyhive_property_imported_acquaint_xml

Hook type: Action

Description: Executed after each individual property is imported.

Example usage:

add_action( 'propertyhive_property_imported_acquaint_xml', 'property_imported', 10, 2 );
function property_imported( $post_id, $property )
{
    // $post_id (int) - the WordPress post ID of the imported property
    // $property (SimpleXML object) - The property received from Acquaint

    // do something here...
}

Hook name: propertyhive_post_import_properties_acquaint_xml

Hook type: Action

Description: Executed after all properties have been imported.

Example usage:

add_action( 'propertyhive_post_import_properties_acquaint_xml', 'post_import' );
function post_import()
{
    // do something here...
}

Hook name: propertyhive_property_removed_acquaint_xml

Hook type: Action

Description: Executed after a property has been removed from Property Hive due to it not being present in the feed.

Example usage:

add_action( 'propertyhive_property_removed_acquaint_xml', 'property_removed' );
function property_removed( $post_id )
{
    // $post_id (int) - the WordPress post ID of the imported property

    // do something here...
}