Plugin Directory

Changeset 3490077


Ignore:
Timestamp:
03/24/2026 01:59:38 PM (4 days ago)
Author:
PropertyHive
Message:

Update to version 2.5.43

Location:
houzez-property-feed/trunk
Files:
1 added
11 edited

Legend:

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

    r3467631 r3490077  
    44Requires at least: 3.8
    55Tested up to: 6.9
    6 Stable tag: 2.5.42
    7 Version: 2.5.42
     6Stable tag: 2.5.43
     7Version: 2.5.43
    88Homepage: https://houzezpropertyfeed.com
    99License: GPLv3
     
    5050* MLS/IDX (assuming XML URL can be provided)
    5151* MLS Grid
    52 * myCRM / PF Expert from Property Finder
     52* myCRM / PF Expert from Property Finder UAE (XML and API)
    5353* OpenImmo
    5454* Pixxi
     
    147147== Changelog ==
    148148
     149= 2.5.43 - 2026-03-24 =
     150* Added preliminary support for importing from Property Finder UAE using their API
     151* Added more logging to PropCtrl state change PUT request
     152* Updated which field is used for Apimo land area
     153* Corrected wrong property count showing in export logs being wrong due to hitting MySQL 'group_concat_max_len' setting
     154
    149155= 2.5.42 - 2026-02-23 =
    150156* Added EPC ratings to Zoopla exports
  • houzez-property-feed/trunk/houzez-property-feed.php

    r3467631 r3490077  
    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.42
     6 * Version: 2.5.43
    77 * Author: PropertyHive
    88 * Author URI: https://wp-property-hive.com
     
    2020     * @var string
    2121     */
    22     public $version = '2.5.42';
     22    public $version = '2.5.43';
    2323
    2424    /**
  • houzez-property-feed/trunk/includes/class-houzez-property-feed-admin-logs-export-table.php

    r3255514 r3490077  
    108108                if ( $item->property_ids != '' )
    109109                {
    110                     $explode_property_ids = explode(",", $item->property_ids);
     110                    $explode_property_ids = $item->property_ids;
    111111                    if ( count($explode_property_ids) == 1 )
    112112                    {
     
    168168        $export_id = !empty($_GET['export_id']) ? (int)$_GET['export_id'] : '';
    169169
    170         /*$extra_query = "";
    171         if ( !empty($export_id) )
     170        $extra_query = "";
     171        /*if ( !empty($export_id) )
    172172        {
    173173            $export_settings = houzez_property_feed_get_export_settings_from_id( $export_id );
     
    179179                if ($format['method'] == 'realtime')
    180180                {*/
    181                     $extra_query = ", (
     181                    /*$extra_query = ", (
    182182                    SELECT GROUP_CONCAT(DISTINCT post_id SEPARATOR ',')
    183183                        FROM
     
    187187                        AND
    188188                            post_id != 0
    189                     ) AS property_ids";
     189                    ) AS property_ids";*/
    190190                /*}
    191191            }
     
    222222        $this->items = $wpdb->get_results($query);
    223223
     224        if ( is_array($this->items) )
     225        {
     226            foreach ($this->items as $item)
     227            {
     228                $item->property_ids = $wpdb->get_col($wpdb->prepare(
     229                    "
     230                    SELECT DISTINCT post_id
     231                    FROM {$wpdb->prefix}houzez_property_feed_export_logs_instance_log
     232                    WHERE instance_id = %d
     233                      AND post_id != 0
     234                    ",
     235                    $item->id
     236                ));
     237            }
     238        }
     239
    224240        $this->set_pagination_args(
    225241            array(
  • houzez-property-feed/trunk/includes/format-functions.php

    r3457031 r3490077  
    21702170            'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/propctrl/'
    21712171        ),
     2172        'property_finder_api' => array(
     2173            'name' => __( 'Property Finder / PF Expert / myCRM API', 'houzezpropertyfeed' ),
     2174            'fields' => array(
     2175                 array(
     2176                    'id' => 'api_key',
     2177                    'label' => __( 'API Key', 'propertyhive' ),
     2178                    'type' => 'text',
     2179                ),
     2180                array(
     2181                    'id' => 'api_secret',
     2182                    'label' => __( 'API Secret', 'propertyhive' ),
     2183                    'type' => 'text',
     2184                ),
     2185            ),
     2186            'address_fields' => array( /*'city', 'community', 'sub_community'*/ ),
     2187            'taxonomy_values' => array(
     2188                'sales_status' => array(
     2189                    'Sales' => 'Sales',
     2190                ),
     2191                'lettings_status' => array(
     2192                    'Lettings' => 'Lettings',
     2193                ),
     2194                'property_type' => array(
     2195                    'bulk-sale-unit' => 'bulk-sale-unit',
     2196                    'warehouse' => 'warehouse',
     2197                    'restaurant' => 'restaurant',
     2198                    'roof' => 'roof',
     2199                    'factory' => 'factory',
     2200                    'half-floor' => 'half-floor',
     2201                    'twin-house' => 'twin-house',
     2202                    'cabin' => 'cabin',
     2203                    'land' => 'land',
     2204                    'bulk-rent-unit' => 'bulk-rent-unit',
     2205                    'ivilla' => 'ivilla',
     2206                    'show-room' => 'show-room',
     2207                    'villa' => 'villa',
     2208                    'co-working-space' => 'co-working-space',
     2209                    'apartment' => 'apartment',
     2210                    'whole-building' => 'whole-building',
     2211                    'full-floor' => 'full-floor',
     2212                    'hotel-apartment' => 'hotel-apartment',
     2213                    'office-space' => 'office-space',
     2214                    'retail' => 'retail',
     2215                    'shop' => 'shop',
     2216                    'duplex' => 'duplex',
     2217                    'townhouse' => 'townhouse',
     2218                    'chalet' => 'chalet',
     2219                    'staff-accommodation' => 'staff-accommodation',
     2220                    'farm' => 'farm',
     2221                    'medical-facility' => 'medical-facility',
     2222                    'palace' => 'palace',
     2223                    'penthouse' => 'penthouse',
     2224                    'clinic' => 'clinic',
     2225                    'cafeteria' => 'cafeteria',
     2226                    'bungalow' => 'bungalow',
     2227                    'compound' => 'compound',
     2228                    'rest-house' => 'rest-house',
     2229                    'labor-camp' => 'labor-camp',
     2230                    'business-center' => 'business-center',
     2231                )
     2232            ),
     2233            'contact_information_fields' => array(
     2234                //'agent_name',
     2235            ),
     2236            'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/property-finder/',
     2237            //'warnings' => array_filter( array( $simplexml_warning ) ),
     2238            'test_button' => true,
     2239        ),
    21722240        'property_finder' => array(
    2173             'name' => __( 'Property Finder / PF Expert / myCRM', 'houzezpropertyfeed' ),
     2241            'name' => __( 'Property Finder / PF Expert / myCRM XML', 'houzezpropertyfeed' ),
    21742242            'fields' => array(
    21752243                array(
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-10ninety.php

    r3389696 r3490077  
    2828        $this->properties = array();
    2929
    30         if ( $test === false || $troubleshooting === true )
     30        if ( $test === false )
    3131        {
    3232            $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );
    33             $test = true;
    3433        }
    3534        else
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-acquaint.php

    r3389696 r3490077  
    2626        $this->properties = array();
    2727
    28         if ( $test === false || $troubleshooting === true )
     28        if ( $test === false )
    2929        {
    3030            $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );
    31             $test = true;
    3231        }
    3332        else
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-agestanet.php

    r3389696 r3490077  
    3131        $this->properties = array();
    3232
    33         if ( $test === false || $troubleshooting === true )
     33        if ( $test === false )
    3434        {
    3535            $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );
    36             $test = true;
    3736        }
    3837        else
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-apimo.php

    r3467631 r3490077  
    463463
    464464                $floor_area = '';
    465                 $land_area = '';
    466465                $area_prefix = '';
    467466                if ( isset($property['area']['value']) && !empty($property['area']['value']) )
     
    469468                    $floor_area = $property['area']['value'];
    470469                }
    471                 if ( isset($property['area']['total']) && !empty($property['area']['total']) )
     470                if ( !empty($floor_area) )
    472471                {
    473                     $land_area = $property['area']['total'];
    474                 }
    475                 if ( !empty($floor_area) || !empty($land_area) )
    476                 {
    477                     $area_prefix = 'm2';
     472                    $area_prefix = 'm²';
    478473                    if ( isset($property['area']['unit']) )
    479474                    {
     
    498493                update_post_meta( $post_id, 'fave_property_size', $floor_area );
    499494                update_post_meta( $post_id, 'fave_property_size_prefix', $area_prefix );
     495
     496                $land_area = '';
     497                $area_prefix = '';
     498                if ( isset($property['areas']) && is_array($property['areas']) )
     499                {
     500                    foreach ( $property['areas'] as $area )
     501                    {
     502                        if ( isset($area['type']) && $area['type'] == 101 && isset($area['area']) && !empty($area['area']) )
     503                        {
     504                            $land_area = $area['area'];
     505                            $area_prefix = 'm²';
     506                        }
     507                    }
     508                }
     509                if ( empty($land_area) )
     510                {
     511                    if ( isset($property['area']['total']) && !empty($property['area']['total']) )
     512                    {
     513                        $land_area = $property['area']['total'];
     514                        $area_prefix = 'm²';
     515                        if ( isset($property['area']['unit']) )
     516                        {
     517                            switch ( (int)$property['area']['unit'] )
     518                            {
     519                                case 1:  $area_prefix = 'm²'; break;
     520                                case 2:  $area_prefix = 'sq ft'; break;
     521                                case 3:  $area_prefix = 'kanal'; break;
     522                                case 4:  $area_prefix = 'marla'; break;
     523                                case 5:  $area_prefix = 'sq yd'; break;
     524                                case 6:  $area_prefix = 'acre'; break;
     525                                case 7:  $area_prefix = 'ha'; break;
     526                                case 8:  $area_prefix = 'ares'; break;
     527                                case 9:  $area_prefix = 'toises'; break;
     528                                case 10: $area_prefix = 'perches'; break;
     529                                case 11: $area_prefix = 'arpents'; break;
     530                                case 12: $area_prefix = 'centiare'; break;
     531                            }
     532
     533                        }
     534                    }
     535                }
    500536                update_post_meta( $post_id, 'fave_property_land', $land_area );
    501537                update_post_meta( $post_id, 'fave_property_land_postfix', $area_prefix );
     
    525561
    526562                $featured = '0';
    527                 update_post_meta( $post_id, 'fave_featured', $featured );
     563                add_post_meta( $post_id, 'fave_featured', $featured, true );
    528564                update_post_meta( $post_id, 'fave_agent_display_option', ( isset($import_settings['agent_display_option']) ? $import_settings['agent_display_option'] : 'none' ) );
    529565
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-propctrl.php

    r3457031 r3490077  
    21942194                        $this->log_error( 'Response when updating status in PropCtrl: ' . $response->get_error_message(), $property['listingId'], $post_id );
    21952195                    }
     2196                    elseif ( wp_remote_retrieve_response_code($response) !== 200 )
     2197                    {
     2198                        $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when changing property state. Error message: ' . wp_remote_retrieve_response_message($response) );
     2199                    }
     2200                    else
     2201                    {
     2202                        $this->log( 'State of property in PropCtrl updated successfully', $property['listingId'], $post_id );
     2203                    }
    21962204                }
    21972205                else
     
    22252233                        $this->log_error( 'Response when updating status in PropCtrl: ' . $response->get_error_message(), $property['listingId'], $post_id );
    22262234                    }
     2235                    elseif ( wp_remote_retrieve_response_code($response) !== 200 )
     2236                    {
     2237                        $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when changing property state. Error message: ' . wp_remote_retrieve_response_message($response) );
     2238                    }
     2239                    else
     2240                    {
     2241                        $this->log( 'State of property in PropCtrl updated successfully', $property['listingId'], $post_id );
     2242                    }
    22272243                }
    22282244
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-resales-online.php

    r3467631 r3490077  
    2222    }
    2323
    24     public function parse()
     24    public function parse( $test = false )
    2525    {
    2626        $this->properties = array(); // Reset properties in the event we're importing multiple files
    2727
     28        if ( $test === false )
     29        {
     30            $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );
     31        }
     32        else
     33        {
     34            $import_settings = map_deep( wp_unslash($_POST), 'sanitize_text_field' );
     35            if ( isset( $_POST['xml_url'] ) )
     36            {
     37                $import_settings['xml_url'] = sanitize_url( wp_unslash( $_POST['xml_url'] ) );
     38            }
     39        }
     40
    2841        $this->log("Parsing properties", '', 0, '', false);
    29 
    30         $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );
    3142
    3243        $contents = '';
     
    4354            return false;
    4455        }
     56
     57        $pro_active = apply_filters( 'houzez_property_feed_pro_active', false );
    4558
    4659        $xml = simplexml_load_string($contents);
     
    88101        }
    89102
    90         if ( empty($this->properties) )
     103        if ( $test === false && empty($this->properties) )
    91104        {
    92105            $this->log_error( 'No properties found. We\'re not going to continue as this could likely be wrong and all properties will get removed if we continue.' );
  • houzez-property-feed/trunk/includes/import-functions.php

    r3442498 r3490077  
    707707            break;
    708708        }
     709        case "property_finder_api":
     710        {
     711            // includes
     712            require_once dirname( __FILE__ ) . '/import-formats/class-houzez-property-feed-format-property-finder-api.php';
     713
     714            $import_object = new Houzez_Property_Feed_Format_Property_Finder_API( $instance_id, $import_id );
     715
     716            break;
     717        }
    709718        case "property_finder":
    710719        {
Note: See TracChangeset for help on using the changeset viewer.