Skip to content

Instantly share code, notes, and snippets.

add_filter( 'houzez_property_feed_wp_rest_api_double_serialized_fields', function ( $fields ) {
$fields[] = '_elementor_page_assets';
return array_unique( $fields );
} );
@propertyhive
propertyhive / gist:7ae100d0ddfbfdc037d8e2ace11883f2
Created October 5, 2026 18:50
Import sold properties from VaultEA / VaultRE
add_filter( 'houzez_property_feed_vaultea_endpoints', 'add_sold_endpoint' );
function add_sold_endpoint($endpoints)
{
$endpoints[] = array(
'uri' => 'properties/residential/sale/sold',
'department' => 'residential-sales',
//'portalStatus' => array( 'listing', 'conditional' )
);
return $endpoints;
add_filter( 'propertyhive_idealista_export_property_data', 'add_size_to_exported_idealista_data', 10, 3 );
function add_size_to_exported_idealista_data( $property_data, $post_id, $portal_id )
{
$area = '';
$property = new PH_Property( (int) $post_id );
$features = $property->get_features();
if ( ! empty( $features ) )
{
@propertyhive
propertyhive / gist:52e0cbf0b170a435fed0b08d583499b6
Created August 10, 2026 19:24
Trim type before importing it from Kyero XML
add_filter( 'houzez_property_feed_properties_due_import_kyero', function( $properties, $import_id ) {
foreach ( $properties as $property ) {
if ( isset( $property->type ) && (string)$property->type != '' )
{
$property->type = trim((string)$property->type, " -"); // add any more characters here you wish to trim from the type
}
}
/**
* Remove video and virtual tour URLs from Kyero imports.
*/
add_filter( 'houzez_property_feed_properties_due_import_kyero', function( $properties, $import_id ) {
foreach ( $properties as $property ) {
// Empty the video URL.
if ( isset( $property->video_url ) ) {
$property->video_url = '';
add_filter( 'propertyhive_property_import_post_data', function( $postdata, $import_id, $property, $crm_id ) {
unset( $postdata['post_date'] );
return $postdata;
}, 10, 4 );
/**
* Replace "~~" with line breaks in the descrip1 node
* before properties are imported from Inmovilla.
*/
add_filter(
'houzez_property_feed_properties_due_import_inmovilla',
function( $properties, $import_id ) {
foreach ( $properties as $property ) {
add_filter( 'propertyhive_property_enquiry_form_fields', 'hide_viewing_fields_on_email', 11, 2 );
function hide_viewing_fields_on_email( $form_controls, $property_id )
{
if ( is_ajax() )
{
// Email is being sent
if ( !isset($_POST['preferred_viewing_date']) )
{
// This is a normal enquiry form
unset( $form_controls['preferred_viewing_date'] );
add_action( "propertyhive_property_imported_rtdf", "correct_commercial_property_availability", 10, 3 );
function correct_commercial_property_availability( $post_id, $property, $import_id )
{
$department = get_post_meta( $post_id, '_department', true );
if ( $department == 'commercial' )
{
$to_rent = get_post_meta( $post_id, '_to_rent', true );
if ( $to_rent == 'yes' )
<?php
add_filter( 'ph_zoopla_rtdf_send_request_data', 'td_fix_zoopla_poa_per_channel', 20, 2 );
function td_fix_zoopla_poa_per_channel( $request_data, $post_id ) {
$department = get_post_meta( $post_id, '_department', true );
if (
$department !== 'commercial' &&
function_exists( 'ph_get_custom_department_based_on' ) &&