Plugin Directory

Changeset 3467631


Ignore:
Timestamp:
02/23/2026 11:33:22 AM (5 weeks ago)
Author:
PropertyHive
Message:

Update to version 2.5.42

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

Legend:

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

    r3457031 r3467631  
    44Requires at least: 3.8
    55Tested up to: 6.9
    6 Stable tag: 2.5.41
    7 Version: 2.5.41
     6Stable tag: 2.5.42
     7Version: 2.5.42
    88Homepage: https://houzezpropertyfeed.com
    99License: GPLv3
     
    147147== Changelog ==
    148148
     149= 2.5.42 - 2026-02-23 =
     150* Added EPC ratings to Zoopla exports
     151* Added support for youTube videos in Apimo imports
     152* Added support for energy fields from Apimo
     153* Updated ReSales Online XML imports to respect any limits set during the parsing phase
     154* Updated ReSales Online XML imports to cater for differing lat/lng field structure
     155* Updated Zoopla exports by passing through brochure captions
     156* Updated field rules using JSONPath to cater for field being arrays
     157* Corrected issue with currency being wrong in thinkSPAIN exports
     158* Corrected wrong variable name in Facebook export filters
     159
    149160= 2.5.41 - 2026-02-09 =
    150161* Added office and location filters to Bridge MLS import settings
  • houzez-property-feed/trunk/houzez-property-feed.php

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

    r3389138 r3467631  
    737737                            $path = new Flow\JSONPath\JSONPath($json);
    738738
    739                             $results = $path->find($rule['field']);
     739                            $results = $path->find($rule['field'])->getData();
    740740
    741741                            if ( count($results) === 0 )
     
    763763                            }
    764764                            elseif (
    765                                 ( !isset($rule['operator']) || ( isset($rule['operator']) && $rule['operator'] == '=' ) ) && trim($value_to_check) == $rule['equal']
    766                             )
    767                             {
    768                                 $found = true;
    769                             }
    770                             elseif (
    771                                 ( isset($rule['operator']) && $rule['operator'] == '!=' ) && trim($value_to_check) != $rule['equal']
     765
     766                                ( !isset($rule['operator']) || ( isset($rule['operator']) && $rule['operator'] == '=' ) )
     767                                && (
     768                                    ( is_array($value_to_check) && (function() use ($value_to_check, $rule) {
     769                                        foreach ($value_to_check as $v) {
     770                                            if (trim((string)$v) == $rule['equal']) return true;
     771                                        }
     772                                        return false;
     773                                    })() )
     774                                    || ( !is_array($value_to_check) && trim((string)$value_to_check) == $rule['equal'] )
     775                                )
     776                            )
     777                            {
     778                                $found = true;
     779                            }
     780                            elseif (
     781                                ( isset($rule['operator']) && $rule['operator'] == '!=' )
     782                                && (
     783                                    ( is_array($value_to_check) && (function() use ($value_to_check, $rule) {
     784                                        foreach ($value_to_check as $v) {
     785                                            if (trim((string)$v) == $rule['equal']) return false; // any equal ⇒ fail
     786                                        }
     787                                        return true; // none equal ⇒ pass
     788                                    })() )
     789                                    || ( !is_array($value_to_check) && trim((string)$value_to_check) != $rule['equal'] )
     790                                )
    772791                            )
    773792                            {
  • houzez-property-feed/trunk/includes/export-formats/class-houzez-property-feed-format-facebook.php

    r3389596 r3467631  
    332332                //$listing_xml->addChild('parking_type', $parking);
    333333
    334                 $property_xml = apply_filters( 'houzez_property_feed_export_property_data', $property_xml, $post->ID, $this->export_id );
    335                 $property_xml = apply_filters( 'houzez_property_feed_export_facebook_property_data', $property_xml, $post->ID, $this->export_id );
     334                $listing_xml = apply_filters( 'houzez_property_feed_export_property_data', $listing_xml, $post->ID, $this->export_id );
     335                $listing_xml = apply_filters( 'houzez_property_feed_export_facebook_property_data', $listing_xml, $post->ID, $this->export_id );
    336336                $this->log("Property written to Facebook XML file", '', $post->ID);
    337337
  • houzez-property-feed/trunk/includes/export-formats/class-houzez-property-feed-format-thinkspain.php

    r3418321 r3467631  
    140140                $currency = 'EUR';
    141141
    142                 if ( houzez_option('multi_currency') == '1' )
    143                 {
    144                     $default_multi_currency = houzez_option('default_multi_currency');
     142                if ( fave_option('multi_currency') == '1' )
     143                {
     144                    $default_multi_currency = fave_option('default_multi_currency');
    145145                    if ( !empty($default_multi_currency) && strlen($default_multi_currency) == 3 )
    146146                    {
     
    155155                else
    156156                {
    157                     $symbol = houzez_option('currency_symbol');
     157                    $symbol = fave_option('currency_symbol');
    158158                    switch ($symbol)
    159159                    {
  • houzez-property-feed/trunk/includes/export-formats/class-houzez-property-feed-format-zoopla.php

    r3389596 r3467631  
    312312        $request_data['display_address'] = get_the_title($post_id);
    313313
     314        $epc_ratings = array();
     315        $eer_current_rating = (int)get_post_meta( $post_id, 'fave_epc_current_rating', TRUE );
     316        if ( !empty($eer_current_rating) )
     317        {
     318            $epc_ratings['eer_current_rating'] = $eer_current_rating;
     319        }
     320        $eer_potential_rating = (int)get_post_meta( $post_id, 'fave_epc_potential_rating', TRUE );
     321        if ( !empty($eer_potential_rating) )
     322        {
     323            $epc_ratings['eer_potential_rating'] = $eer_potential_rating;
     324        }
     325        if ( !empty($epc_ratings) )
     326        {
     327            $request_data['epc_ratings'] = $epc_ratings;
     328        }
     329
    314330        $features = array();
    315331        $term_list = wp_get_post_terms($post_id, 'property_feature', array("fields" => "all"));
     
    614630            if ($url !== FALSE)
    615631            {
    616                 $attachment_data = wp_prepare_attachment_for_js( $attachment_id );
     632                $attachment = get_post( $attachment_id );
     633
     634                $caption = '';
     635
     636                if ( $attachment )
     637                {
     638                    if ( ! empty( $attachment->post_excerpt ) )
     639                    {
     640                        $caption = $attachment->post_excerpt;
     641                    }
     642                    elseif ( ! empty( $attachment->post_title ) )
     643                    {
     644                        $caption = $attachment->post_title;
     645                    }
     646                }
    617647
    618648                $media = array(
     
    620650                    'type' => 'brochure',
    621651                );
    622                 if ( isset( $attachment_data['alt'] ) && $attachment_data['alt'] != '' )
    623                 {
    624                     $media['caption'] = trim($attachment_data['alt']);
     652                if ( !empty($caption) )
     653                {
     654                    $media['caption'] = trim($caption);
    625655                }
    626656
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-apimo.php

    r3457031 r3467631  
    628628                    }
    629629                }
     630
     631                $fave_energy_class = '';
     632                if ( isset($property['regulations']) && is_array($property['regulations']) )
     633                {
     634                    foreach ( $property['regulations'] as $regulation )
     635                    {
     636                        if ( isset($regulation['type']) && $regulation['type'] == 79 && isset($regulation['value']) && !empty($regulation['value']) )
     637                        {
     638                            $fave_energy_class = $regulation['value'];
     639                        }
     640                    }
     641                }
     642                update_post_meta( $post_id, 'fave_energy_class', $fave_energy_class );
     643               
     644                $fave_epc_current_rating = '';
     645                if ( isset($property['regulations']) && is_array($property['regulations']) )
     646                {
     647                    foreach ( $property['regulations'] as $regulation )
     648                    {
     649                        if ( isset($regulation['type']) && $regulation['type'] == 89 && isset($regulation['value']) && !empty($regulation['value']) )
     650                        {
     651                            $fave_epc_current_rating = $regulation['value'];
     652                        }
     653                    }
     654                }
     655                update_post_meta( $post_id, 'fave_epc_current_rating', $fave_epc_current_rating );
     656               
     657                $fave_epc_potential_rating = '';
     658                if ( isset($property['regulations']) && is_array($property['regulations']) )
     659                {
     660                    foreach ( $property['regulations'] as $regulation )
     661                    {
     662                        if ( isset($regulation['type']) && $regulation['type'] == 90 && isset($regulation['value']) && !empty($regulation['value']) )
     663                        {
     664                            $fave_epc_potential_rating = $regulation['value'];
     665                        }
     666                    }
     667                }
     668                update_post_meta( $post_id, 'fave_epc_potential_rating', $fave_epc_potential_rating );
    630669               
    631670                $mappings = ( isset($import_settings['mappings']) && is_array($import_settings['mappings']) && !empty($import_settings['mappings']) ) ? $import_settings['mappings'] : array();
     
    9981037                }
    9991038
     1039                update_post_meta( $post_id, 'fave_video_url', '' );
     1040                update_post_meta( $post_id, 'fave_virtual_tour', '' );
     1041
     1042                if ( isset($property['medias']) && !empty($property['medias']) )
     1043                {
     1044                    foreach ( $property['medias'] as $media )
     1045                    {
     1046                        if (
     1047                            isset($media['internet']) && $media['internet'] === "1" &&
     1048                            isset($media['value']) &&
     1049                            preg_match('~^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/~i', $media['value'])
     1050                        )
     1051                        {
     1052                            update_post_meta( $post_id, 'fave_video_url', $media['value'] );
     1053                            break;
     1054                        }
     1055                    }
     1056                }
     1057
    10001058                do_action( "houzez_property_feed_property_imported", $post_id, $property, $this->import_id, $this->instance_id );
    10011059                do_action( "houzez_property_feed_property_imported_apimo", $post_id, $property, $this->import_id, $this->instance_id );
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-resales-online.php

    r3389596 r3467631  
    4848        if ( $xml !== FALSE )
    4949        {
     50            $limit = apply_filters( "houzez_property_feed_property_limit", 25 );
     51            if ( $limit !== false )
     52            {
     53           
     54            }
     55            else
     56            {
     57                // using pro, but check for limit setting
     58                if (
     59                    $pro_active === true &&
     60                    isset($import_settings['limit']) &&
     61                    !empty((int)$import_settings['limit']) &&
     62                    is_numeric($import_settings['limit'])
     63                )
     64                {
     65                    $limit = (int)$import_settings['limit'];
     66                }
     67            }
     68
    5069            foreach ( $xml->property as $property )
    5170            {
    5271                if ( !isset($property->status) || ( isset($property->status) && (string)$property->status != 'Off Market' ) )
    5372                {
     73                    if ( $test === false && $limit !== FALSE && count($this->properties) >= $limit )
     74                    {
     75                        return true;
     76                    }
     77
    5478                    $this->properties[] = $property;
    5579                }
     
    356380                    $lng = (string)$property->location->longitude;
    357381                }
     382                if ( isset($property->latitude) && !empty((string)$property->latitude) && isset($property->longitude) && !empty((string)$property->longitude) )
     383                {
     384                    $lat = (string)$property->latitude;
     385                    $lng = (string)$property->longitude;
     386                }
    358387                update_post_meta( $post_id, 'fave_property_location', $lat . "," . $lng . ",14" );
    359388                $country = 'ES';
Note: See TracChangeset for help on using the changeset viewer.