Plugin Directory

Changeset 3457031


Ignore:
Timestamp:
02/09/2026 12:09:11 PM (7 weeks ago)
Author:
PropertyHive
Message:

Update to version 2.5.41

Location:
houzez-property-feed/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • houzez-property-feed/trunk/README.txt

    r3448071 r3457031  
    44Requires at least: 3.8
    55Tested up to: 6.9
    6 Stable tag: 2.5.40
    7 Version: 2.5.40
     6Stable tag: 2.5.41
     7Version: 2.5.41
    88Homepage: https://houzezpropertyfeed.com
    99License: GPLv3
     
    147147== Changelog ==
    148148
     149= 2.5.41 - 2026-02-09 =
     150* Added office and location filters to Bridge MLS import settings
     151* Added extra fields to thinkSPAIN mapping fields
     152* Updated ExpertAgent imports to include a filter so the number of features imported can be customised
     153* Updated area/size values sent in RTDF exports, casting them to integers to ensure they pass OTM validation
     154* Updated various elements of the Apimo import, including importing size, bathrooms, correcting rent frequencies and more
     155* Corrected default PropCtrl status and type mapping options
     156
    149157= 2.5.40 - 2026-01-27 =
    150158* Added 'Location' filter to Amplify Syndication import settings to specify only properties in a certain city/state are imported
  • houzez-property-feed/trunk/cron-export.php

    r3393603 r3457031  
    33if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    44
    5 register_shutdown_function( "houzez_property_feed_export_fatal_handler" );
    6 function houzez_property_feed_export_fatal_handler() {
    7 
    8     $error = error_get_last();
    9 
    10     if ($error !== NULL)
    11     {
    12         if ( ($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)|| ($error['type'] === E_USER_NOTICE) )
    13         {
    14             $errno   = $error["type"];
    15             $errfile = $error["file"];
    16             $errline = $error["line"];
    17             $errstr  = $error["message"];
    18 
    19             $error_text = houzez_property_feed_export_format_error( $errno, $errstr, $errfile, $errline );
    20 
    21             global $wpdb, $instance_id;
    22 
    23             $current_date = new DateTimeImmutable( 'now', new DateTimeZone('UTC') );
    24             $current_date = $current_date->format("Y-m-d H:i:s");
    25 
    26             $wpdb->insert(
    27                 $wpdb->prefix . "houzez_property_feed_export_logs_instance_log",
    28                 array(
    29                     'instance_id' => $instance_id,
    30                     'post_id' => 0,
    31                     'severity' => 1,
    32                     'entry' => $error_text,
    33                     'log_date' => $current_date
    34                 )
    35             );
    36         }
    37     }
    38 }
    39 
    40 // Returns a formatted version of the fatal error, showing the error message and number, filename and line number
    41 function houzez_property_feed_export_format_error( $errno, $errstr, $errfile, $errline ) {
    42     $trace = print_r( debug_backtrace( false ), true );
    43     $file_split = explode('/', $errfile);
    44     $trimmed_filename = implode('/', array_slice($file_split, -2));
    45     $content = 'Error:' . $errstr . '|' . $errno . '|' . $trimmed_filename . '|' . $errline . '|' . $trace;
    46     return $content;
     5if ( !function_exists('houzez_property_feed_export_fatal_handler') )
     6{
     7    function houzez_property_feed_export_fatal_handler() {
     8
     9        $error = error_get_last();
     10
     11        if ($error !== NULL)
     12        {
     13            if ( ($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)|| ($error['type'] === E_USER_NOTICE) )
     14            {
     15                $errno   = $error["type"];
     16                $errfile = $error["file"];
     17                $errline = $error["line"];
     18                $errstr  = $error["message"];
     19
     20                $error_text = houzez_property_feed_export_format_error( $errno, $errstr, $errfile, $errline );
     21
     22                global $wpdb, $instance_id;
     23
     24                $current_date = new DateTimeImmutable( 'now', new DateTimeZone('UTC') );
     25                $current_date = $current_date->format("Y-m-d H:i:s");
     26
     27                $wpdb->insert(
     28                    $wpdb->prefix . "houzez_property_feed_export_logs_instance_log",
     29                    array(
     30                        'instance_id' => $instance_id,
     31                        'post_id' => 0,
     32                        'severity' => 1,
     33                        'entry' => $error_text,
     34                        'log_date' => $current_date
     35                    )
     36                );
     37            }
     38        }
     39    }
     40    register_shutdown_function( "houzez_property_feed_export_fatal_handler" );
     41}
     42
     43if ( !function_exists('houzez_property_feed_export_format_error') )
     44{
     45    // Returns a formatted version of the fatal error, showing the error message and number, filename and line number
     46    function houzez_property_feed_export_format_error( $errno, $errstr, $errfile, $errline ) {
     47        $trace = print_r( debug_backtrace( false ), true );
     48        $file_split = explode('/', $errfile);
     49        $trimmed_filename = implode('/', array_slice($file_split, -2));
     50        $content = 'Error:' . $errstr . '|' . $errno . '|' . $trimmed_filename . '|' . $errline . '|' . $trace;
     51        return $content;
     52    }
    4753}
    4854
  • houzez-property-feed/trunk/cron-import.php

    r3428872 r3457031  
    33if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    44
    5 register_shutdown_function( "houzez_property_feed_import_fatal_handler" );
    6 function houzez_property_feed_import_fatal_handler() {
    7 
    8     $error = error_get_last();
    9 
    10     if ($error !== NULL)
    11     {
    12         if ( ($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR) || ($error['type'] === E_USER_NOTICE) )
    13         {
    14             $errno   = $error["type"];
    15             $errfile = $error["file"];
    16             $errline = $error["line"];
    17             $errstr  = $error["message"];
    18 
    19             $error_text = houzez_property_feed_import_format_error( $errno, $errstr, $errfile, $errline );
    20 
    21             global $wpdb, $instance_id;
    22 
    23             $current_date = new DateTimeImmutable( 'now', new DateTimeZone('UTC') );
    24             $current_date = $current_date->format("Y-m-d H:i:s");
    25 
    26             $instance_id = isset($instance_id) && !empty($instance_id) ? $instance_id : 0;
    27 
    28             $wpdb->insert(
    29                 $wpdb->prefix . "houzez_property_feed_logs_instance_log",
    30                 array(
    31                     'instance_id' => $instance_id,
    32                     'post_id' => 0,
    33                     'crm_id' => '',
    34                     'severity' => 1,
    35                     'entry' => $error_text,
    36                     'log_date' => $current_date
    37                 )
    38             );
    39         }
    40     }
     5if ( !function_exists('houzez_property_feed_import_fatal_handler') )
     6{
     7    function houzez_property_feed_import_fatal_handler() {
     8
     9        $error = error_get_last();
     10
     11        if ($error !== NULL)
     12        {
     13            if ( ($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR) || ($error['type'] === E_USER_NOTICE) )
     14            {
     15                $errno   = $error["type"];
     16                $errfile = $error["file"];
     17                $errline = $error["line"];
     18                $errstr  = $error["message"];
     19
     20                $error_text = houzez_property_feed_import_format_error( $errno, $errstr, $errfile, $errline );
     21
     22                global $wpdb, $instance_id;
     23
     24                $current_date = new DateTimeImmutable( 'now', new DateTimeZone('UTC') );
     25                $current_date = $current_date->format("Y-m-d H:i:s");
     26
     27                $instance_id = isset($instance_id) && !empty($instance_id) ? $instance_id : 0;
     28
     29                $wpdb->insert(
     30                    $wpdb->prefix . "houzez_property_feed_logs_instance_log",
     31                    array(
     32                        'instance_id' => $instance_id,
     33                        'post_id' => 0,
     34                        'crm_id' => '',
     35                        'severity' => 1,
     36                        'entry' => $error_text,
     37                        'log_date' => $current_date
     38                    )
     39                );
     40            }
     41        }
     42    }
     43    register_shutdown_function( "houzez_property_feed_import_fatal_handler" );
    4144}
    4245
    43 // Returns a formatted version of the fatal error, showing the error message and number, filename and line number
    44 function houzez_property_feed_import_format_error( $errno, $errstr, $errfile, $errline ) {
    45     $trace = print_r( debug_backtrace( false ), true );
    46     $file_split = explode('/', $errfile);
    47     $trimmed_filename = implode('/', array_slice($file_split, -2));
    48     $content = 'Error:' . $errstr . '|' . $errno . '|' . $trimmed_filename . '|' . $errline . '|' . $trace;
    49     return $content;
     46if ( !function_exists('houzez_property_feed_import_format_error') )
     47{
     48    // Returns a formatted version of the fatal error, showing the error message and number, filename and line number
     49    function houzez_property_feed_import_format_error( $errno, $errstr, $errfile, $errline ) {
     50        $trace = print_r( debug_backtrace( false ), true );
     51        $file_split = explode('/', $errfile);
     52        $trimmed_filename = implode('/', array_slice($file_split, -2));
     53        $content = 'Error:' . $errstr . '|' . $errno . '|' . $trimmed_filename . '|' . $errline . '|' . $trace;
     54        return $content;
     55    }
    5056}
    5157
  • houzez-property-feed/trunk/houzez-property-feed.php

    r3448071 r3457031  
    44 * Plugin Uri: https://houzezpropertyfeed.com
    55 * Description: Automatically import properties to Houzez from estate agency CRMs and export to portals
    6  * Version: 2.5.40
     6 * Version: 2.5.41
    77 * Author: PropertyHive
    88 * Author URI: https://wp-property-hive.com
     
    2020     * @var string
    2121     */
    22     public $version = '2.5.40';
     22    public $version = '2.5.41';
    2323
    2424    /**
  • houzez-property-feed/trunk/includes/export-formats/class-houzez-property-feed-format-rtdf.php

    r3442498 r3457031  
    601601        )
    602602        {
    603             $request_data['property']['details']['internal_area'] = get_post_meta( $post_id, 'fave_property_size', TRUE );
     603            $request_data['property']['details']['internal_area'] = (int)get_post_meta( $post_id, 'fave_property_size', TRUE );
    604604
    605605            $unit = null;
     
    629629        )
    630630        {
    631             $request_data['property']['details']['land_area'] = get_post_meta( $post_id, 'fave_property_land', TRUE );
     631            $request_data['property']['details']['land_area'] = (int)get_post_meta( $post_id, 'fave_property_land', TRUE );
    632632
    633633            $unit = null;
  • houzez-property-feed/trunk/includes/format-functions.php

    r3448071 r3457031  
    890890                    'default' => array( 'Active', 'Coming Soon' ),
    891891                    'tooltip' => 'One or more must be selected. Ctrl/Cmd + Click to select multiple',
     892                ),
     893                array(
     894                    'id' => 'office_name',
     895                    'label' => __( 'Office Name(s)', 'houzezpropertyfeed' ),
     896                    'type' => 'text',
     897                    'tooltip' => 'Case-sensitive. Comma-delimited list of office names to import. Taken from the ListOfficeName field in the data',
     898                ),
     899                array(
     900                    'id' => 'location',
     901                    'label' => __( 'Location(s)', 'houzezpropertyfeed' ),
     902                    'type' => 'text',
     903                    'tooltip' => 'Case-sensitive. Comma-delimited list of cities, states or provinces to import',
    892904                ),
    893905                /*array(
     
    21312143            'taxonomy_values' => array(
    21322144                'sales_status' => array(
    2133                     'For Sale' => 'For Sale',
    2134                     'Under Offer' => 'Under Offer',
    2135                     'Sold STC' => 'Sold STC',
    2136                     'For Sale and To Let' => 'For Sale and To Let',
    2137                 ),
    2138                 'lettings_status' => array(
    2139                     'To Let' => 'To Let',
    2140                     'Let Agreed' => 'Let Agreed',
    2141                     'For Sale and To Let' => 'For Sale and To Let',
    2142                 ),
    2143                 'property_type' => array(
     2145                    'Active' => 'Active',
     2146                    'Pending' => 'Pending',
     2147                ),
     2148                'lettings_status' => array(
     2149                    'Active' => 'Active',
     2150                    'Pending' => 'Pending',
     2151                ),
     2152                'property_type' => array(
     2153                    'House' => 'House',
    21442154                    'Detached House' => 'Detached House',
    21452155                    'Semi-Detached House' => 'Semi-Detached House',
     
    41704180                'bedrooms'          => 'bedrooms',
    41714181                'bathrooms'         => 'bathrooms',
     4182                'new_build'         => 'new_build',
     4183                'year_built'        => 'year_built',
     4184                'levels'            => 'levels',
    41724185            ),
    41734186            'taxonomy_values' => array(
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-apimo.php

    r3418321 r3457031  
    5959                return false;
    6060            }
     61
     62            if ( wp_remote_retrieve_response_code($response) !== 200 )
     63            {
     64                $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when requesting properties. Error message: ' . wp_remote_retrieve_response_message($response) );
     65                return false;
     66            }
    6167
    6268            $json = json_decode( $response['body'], TRUE );
     
    393399                            switch ( $property['price']['period'] )
    394400                            {
    395                                 case "1": { $rent_frequency = 'per day'; }
    396                                 case "2": { $rent_frequency = 'per week'; }
    397                                 case "3": { $rent_frequency = 'per fortnight'; }
    398                                 case "4": { $rent_frequency = 'per month'; }
    399                                 case "5": { $rent_frequency = 'quarterly'; }
    400                                 case "6": { $rent_frequency = 'bimonthly'; }
    401                                 case "7": { $rent_frequency = 'half-yearly'; }
    402                                 case "8": { $rent_frequency = 'yearly'; }
     401                                case "1": { $rent_frequency = 'per day'; break; }
     402                                case "2": { $rent_frequency = 'per week';  break;}
     403                                case "3": { $rent_frequency = 'per fortnight'; break; }
     404                                case "4": { $rent_frequency = 'per month'; break; }
     405                                case "5": { $rent_frequency = 'quarterly'; break; }
     406                                case "6": { $rent_frequency = 'bimonthly'; break; }
     407                                case "7": { $rent_frequency = 'half-yearly'; break; }
     408                                case "8": { $rent_frequency = 'yearly'; break; }
    403409                            }
    404410                        }
     
    408414
    409415                update_post_meta( $post_id, 'fave_property_bedrooms', ( ( isset($property['bedrooms']) ) ? $property['bedrooms'] : '' ) );
    410                 update_post_meta( $post_id, 'fave_property_bathrooms', '' );
     416               
     417                $bathrooms = '';
     418                if ( isset($property['areas']) && is_array($property['areas']) )
     419                {
     420                    foreach ( $property['areas'] as $area )
     421                    {
     422                        if ( isset($area['type']) && $area['type'] == 8 && isset($area['number']) && !empty($area['number']) )
     423                        {
     424                            $bathrooms = $area['number'];
     425                        }
     426                    }
     427                }
     428                update_post_meta( $post_id, 'fave_property_bathrooms', $bathrooms );
    411429                update_post_meta( $post_id, 'fave_property_rooms', '' );
    412430               
    413                 update_post_meta( $post_id, 'fave_property_garage', '' );
     431                $garages = '';
     432                if ( isset($property['areas']) && is_array($property['areas']) )
     433                {
     434                    foreach ( $property['areas'] as $area )
     435                    {
     436                        if ( isset($area['type']) && $area['type'] == 4 && isset($area['number']) && !empty($area['number']) )
     437                        {
     438                            $garages = $area['number'];
     439                        }
     440                    }
     441                }
     442                update_post_meta( $post_id, 'fave_property_garage', $garages );
    414443                update_post_meta( $post_id, 'fave_property_id', $property['reference'] );
    415444
     
    433462                $address_parts = array_unique($address_parts);
    434463
     464                $floor_area = '';
     465                $land_area = '';
     466                $area_prefix = '';
     467                if ( isset($property['area']['value']) && !empty($property['area']['value']) )
     468                {
     469                    $floor_area = $property['area']['value'];
     470                }
     471                if ( isset($property['area']['total']) && !empty($property['area']['total']) )
     472                {
     473                    $land_area = $property['area']['total'];
     474                }
     475                if ( !empty($floor_area) || !empty($land_area) )
     476                {
     477                    $area_prefix = 'm2';
     478                    if ( isset($property['area']['unit']) )
     479                    {
     480                        switch ( (int)$property['area']['unit'] )
     481                        {
     482                            case 1:  $area_prefix = 'm²'; break;
     483                            case 2:  $area_prefix = 'sq ft'; break;
     484                            case 3:  $area_prefix = 'kanal'; break;
     485                            case 4:  $area_prefix = 'marla'; break;
     486                            case 5:  $area_prefix = 'sq yd'; break;
     487                            case 6:  $area_prefix = 'acre'; break;
     488                            case 7:  $area_prefix = 'ha'; break;
     489                            case 8:  $area_prefix = 'ares'; break;
     490                            case 9:  $area_prefix = 'toises'; break;
     491                            case 10: $area_prefix = 'perches'; break;
     492                            case 11: $area_prefix = 'arpents'; break;
     493                            case 12: $area_prefix = 'centiare'; break;
     494                        }
     495
     496                    }
     497                }
     498                update_post_meta( $post_id, 'fave_property_size', $floor_area );
     499                update_post_meta( $post_id, 'fave_property_size_prefix', $area_prefix );
     500                update_post_meta( $post_id, 'fave_property_land', $land_area );
     501                update_post_meta( $post_id, 'fave_property_land_postfix', $area_prefix );
     502
     503                update_post_meta( $post_id, 'fave_property_year', ( ( isset($property['construction']['construction_year']) && !empty($property['construction']['construction_year']) ) ? $property['construction']['construction_year']: '' ) );
     504
    435505                update_post_meta( $post_id, 'fave_property_map', '1' );
    436506                update_post_meta( $post_id, 'fave_property_map_address', implode(", ", $address_parts) );
     
    451521               
    452522                $address_parts = array();
    453                 if ( $address_street != '' )
    454                 {
    455                     $address_parts[] = $address_street;
    456                 }
    457523                update_post_meta( $post_id, 'fave_property_address', implode(", ", $address_parts) );
    458524                update_post_meta( $post_id, 'fave_property_zip', ( ( isset($property['city']['zipcode']) ) ? $property['city']['zipcode'] : '' ) );
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-bridge.php

    r3389596 r3457031  
    5858            }
    5959        }*/
     60        $office_names = isset($import_settings['office_name']) ? explode(",", $import_settings['office_name']) : array();
     61        $office_names = array_map('trim', $office_names);
     62        $office_names = array_filter($office_names);
     63
     64        $locations = isset($import_settings['location']) ? explode(",", $import_settings['location']) : array();
     65        $locations = array_map('trim', $locations);
     66        $locations = array_filter($locations);
     67
     68        if ( empty($office_names) && empty($locations) )
     69        {
     70            //$this->log("At least one office name or location must be entered into the import settings");
     71            //return false;
     72        }
     73
     74        if ( !empty($office_names) )
     75        {
     76            $office_additional_url = '';
     77            foreach ( $office_names as $i => $office_name )
     78            {
     79                if ( !empty($office_additional_url) ) { $office_additional_url .= ' or '; }
     80                $office_additional_url .= ' ListOfficeName eq %27' . $office_name . '%27 ';
     81            }
     82            $additional_url .= ' and (' . $office_additional_url . ')';
     83        }
     84       
     85        if ( !empty($locations) )
     86        {
     87            $location_additional_url = '';
     88            foreach ( $locations as $i => $location )
     89            {
     90                if ( !empty($location_additional_url) ) { $location_additional_url .= ' or '; }
     91                $location_additional_url .= ' City eq %27' . $location . '%27 or StateOrProvince eq %27' . $location . '%27 ';
     92            }
     93            $additional_url .= ' and (' . $location_additional_url . ')';
     94        }
    6095
    6196        $limit = apply_filters( "houzez_property_feed_property_limit", 25 );
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-expertagent.php

    r3442498 r3457031  
    541541                //turn bullets into property features
    542542                $feature_term_ids = array();
    543                 for ( $i = 1; $i <= 20; ++$i )
     543                $num_features = (int)apply_filters( 'houzez_property_feed_expertagent_feature_count', 20 );
     544                for ( $i = 1; $i <= $num_features; ++$i )
    544545                {
    545546                    if ( isset($property->{'bullet' . $i}) && trim((string)$property->{'bullet' . $i}) != '' )
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-propctrl.php

    r3448071 r3457031  
    15061506                $taxonomy_mappings = ( isset($mappings[$mapping_name]) && is_array($mappings[$mapping_name]) && !empty($mappings[$mapping_name]) ) ? $mappings[$mapping_name] : array();
    15071507
    1508                 $status_field = str_replace('residential-', '', str_replace('sales', 'sale', $department));
    1509 
    1510                 if ( isset($property[$status_field . '_status']) && !empty($property[$status_field . '_status']) )
    1511                 {
    1512                     if ( isset($taxonomy_mappings[$property[$status_field . '_status']]) && !empty($taxonomy_mappings[$property[$status_field . '_status']]) )
    1513                     {
    1514                         wp_set_object_terms( $post_id, (int)$taxonomy_mappings[$property[$status_field . '_status']], "property_status" );
     1508                if ( isset($property['listingStatus']) && !empty($property['listingStatus']) )
     1509                {
     1510                    if ( isset($taxonomy_mappings[$property['listingStatus']]) && !empty($taxonomy_mappings[$property['listingStatus']]) )
     1511                    {
     1512                        wp_set_object_terms( $post_id, (int)$taxonomy_mappings[$property['listingStatus']], "property_status" );
    15151513                    }
    15161514                    else
    15171515                    {
    1518                         $this->log( 'Received status of ' . $property[$status_field . '_status'] . ' that isn\'t mapped in the import settings', $property['listingId'], $post_id );
    1519 
    1520                         $import_settings = $this->add_missing_mapping( $mappings, $mapping_name, $property[$status_field . '_status'], $this->import_id );
     1516                        $this->log( 'Received status of ' . $property['listingStatus'] . ' that isn\'t mapped in the import settings', $property['listingId'], $post_id );
     1517
     1518                        $import_settings = $this->add_missing_mapping( $mappings, $mapping_name, $property['listingStatus'], $this->import_id );
    15211519                    }
    15221520                }
     
    15251523                $taxonomy_mappings = ( isset($mappings['property_type']) && is_array($mappings['property_type']) && !empty($mappings['property_type']) ) ? $mappings['property_type'] : array();
    15261524
    1527                 if ( isset($property['property_type']) && !empty($property['property_type']) )
    1528                 {
    1529                     $type_mapped = false;
    1530 
    1531                     if (
    1532                         isset($property['property_type']) &&
    1533                         $property['property_type'] != '' &&
    1534                         isset($property['property_style']) &&
    1535                         $property['property_style'] != ''
    1536                     )
    1537                     {
    1538                         if (
    1539                             isset($taxonomy_mappings[$property['property_type'] . ' - ' . $property['property_style']]) &&
    1540                             !empty($taxonomy_mappings[$property['property_type'] . ' - ' . $property['property_style']])
    1541                         )
    1542                         {
    1543                             wp_set_object_terms( $post_id, (int)$taxonomy_mappings[$property['property_type'] . ' - ' . $property['property_style']], "property_type" );
    1544                             $type_mapped = true;
    1545                         }
    1546                         else
    1547                         {
    1548                             $this->log( 'Received property type of ' . $property['property_type'] . ' - ' . $property['property_style'] . ' that isn\'t mapped in the import settings', $property['listingId'], $post_id );
    1549 
    1550                             $import_settings = $this->add_missing_mapping( $mappings, 'property_type', $property['property_type'] . ' - ' . $property['property_style'], $this->import_id );
    1551                         }
    1552                     }
    1553 
    1554                     if ( !$type_mapped )
    1555                     {
    1556                         if ( isset($taxonomy_mappings[$property['property_type']]) && !empty($taxonomy_mappings[$property['property_type']]) )
    1557                         {
    1558                             wp_set_object_terms( $post_id, (int)$taxonomy_mappings[$property['property_type']], "property_type" );
    1559                         }
    1560                         else
    1561                         {
    1562                             $this->log( 'Received property type of ' . $property['property_type'] . ' that isn\'t mapped in the import settings', $property['listingId'], $post_id );
    1563 
    1564                             $import_settings = $this->add_missing_mapping( $mappings, 'property_type', $property['property_type'], $this->import_id );
    1565                         }
     1525                if ( isset($property['propertyType']) && !empty($property['propertyType']) )
     1526                {
     1527                    if ( isset($taxonomy_mappings[$property['propertyType']]) && !empty($taxonomy_mappings[$property['propertyType']]) )
     1528                    {
     1529                        wp_set_object_terms( $post_id, (int)$taxonomy_mappings[$property['propertyType']], "property_type" );
     1530                    }
     1531                    else
     1532                    {
     1533                        $this->log( 'Received property type of ' . $property['propertyType'] . ' that isn\'t mapped in the import settings', $property['listingId'], $post_id );
     1534
     1535                        $import_settings = $this->add_missing_mapping( $mappings, 'property_type', $property['propertyType'], $this->import_id );
    15661536                    }
    15671537                }
Note: See TracChangeset for help on using the changeset viewer.