Houzez Property Feed WordPress Plugin Logo

Hooks, Actions and Filters

Hooks ran during an import

Action: houzez_property_feed_pre_import_properties

Run an action after properties have been parsed and just before they get imported.

add_action( 'houzez_property_feed_pre_import_properties', 'my_custom_function', 10, 2 );
// $properties (array) - Array of properties due to be imported
// $import_id (int) - The ID of the automatic import
function my_custom_function( $properties, $import_id )
{
    // Do something here
}

Action: houzez_property_feed_pre_import_properties_{format}

Run an action after properties have been parsed and just before they get imported.

Same as previous action but format specific should you have multiple imports setup and only want to run the action for a certain format.

add_action( 'houzez_property_feed_pre_import_properties_10ninety', 'my_custom_function', 10, 2 );
// $properties (array) - Array of properties due to be imported
// $import_id (int) - The ID of the automatic import
function my_custom_function( $properties, $import_id )
{
    // Do something here
}

Filter: houzez_property_feed_properties_due_import

Ran after the properties have been obtained/parsed but before they’re actually imported. Allows you to filter out certain properties that you don’t want imported.

add_action( 'houzez_property_feed_properties_due_import', 'my_custom_function', 10, 2 );
// $properties (array) - Array of properties due to be imported
// $import_id (int) - The ID of the automatic import
function my_custom_function( $properties, $import_id )
{
    // Do something here

    return $properties;
}

Filter: houzez_property_feed_properties_due_import_{format}

Ran after the properties have been obtained/parsed but before they’re actually imported. Allows you to filter out certain properties that you don’t want imported.

Same as previous filter but format specific should you have multiple imports setup and only want to run the filter for a certain format.

add_action( 'houzez_property_feed_properties_due_import_10ninety', 'my_custom_function', 10, 2 );
// $properties (array) - Array of properties due to be imported
// $import_id (int) - The ID of the automatic import
function my_custom_function( $properties, $import_id )
{
    // Do something here

    return $properties;
}

Action: houzez_property_feed_property_imported

Ran after each property that’s imported.

add_action( 'houzez_property_feed_property_imported', 'my_custom_function', 10, 3 );
// $post_id (int) - The ID of the property post in WordPress
// $property (array/object) - Property data received from the third party. Will differ per CRM. Check a property record and the 'Imported Data' section to see the data received.
// $import_id (int) - The ID of the automatic import
function my_custom_function( $post_id, $property, $import_id  )
{
    // Do something here
}

Action: houzez_property_feed_property_imported_{format}

Ran after each property that’s imported.

Same as previous action but format specific should you have multiple imports setup and only want to run the action for a certain format.

add_action( 'houzez_property_feed_property_imported_10ninety', 'my_custom_function', 10, 3 );
// $post_id (int) - The ID of the property post in WordPress
// $property (array/object) - Property data received from the third party. Will differ per CRM. Check a property record and the 'Imported Data' section to see the data received.
// $import_id (int) - The ID of the automatic import
function my_custom_function( $post_id, $property, $import_id  )
{
    // Do something here
}

Action: houzez_property_feed_cron_end

Ran once at the very end of the import process.

add_action( 'houzez_property_feed_cron_end', 'my_custom_function', 10, 2 );
// $instance_id (int) - Every time an import is ran a new instance is created
// $import_id (int) - The ID of the automatic import
function my_custom_function( $instance_id, $import_id )
{
    // Do something here
}