Plugin Directory

Changeset 3365729


Ignore:
Timestamp:
09/22/2025 11:04:59 AM (6 months ago)
Author:
PropertyHive
Message:

Update to version 2.5.29

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

Legend:

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

    r3358551 r3365729  
    44Requires at least: 3.8
    55Tested up to: 6.8
    6 Stable tag: 2.5.28
    7 Version: 2.5.28
     6Stable tag: 2.5.29
     7Version: 2.5.29
    88Homepage: https://houzezpropertyfeed.com
    99License: GPLv3
     
    144144== Changelog ==
    145145
     146= 2.5.29 - 2025-09-22 =
     147* Added the ability to choose which field to use in Facebook exports as unique ID; post ID or reference number entered into Houzez
     148* Added support for THB currency in Facebook exports
     149* Added support for 'land' properties in REAXML feeds
     150* Updated PropertyFinder import format to import yearly price and size
     151
    146152= 2.5.28 - 2025-09-09 =
    147153* Added support for importing properties from Behomes
  • houzez-property-feed/trunk/houzez-property-feed.php

    r3358551 r3365729  
    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.28
     6 * Version: 2.5.29
    77 * Author: PropertyHive
    88 * Author URI: https://wp-property-hive.com
     
    2020     * @var string
    2121     */
    22     public $version = '2.5.28';
     22    public $version = '2.5.29';
    2323
    2424    /**
  • houzez-property-feed/trunk/includes/export-formats/class-houzez-property-feed-format-facebook.php

    r3255514 r3365729  
    9898        $countries = houzez_property_feed_get_countries();
    9999
     100        $home_listing_id_field = isset($export_settings['home_listing_id_field']) && $export_settings['home_listing_id_field'] == 'fave_property_id' ? $export_settings['home_listing_id_field'] : '';
     101
    100102        if ( $properties_query->have_posts() )
    101103        {
     
    112114                $listing_xml = $xml->addChild('listing');
    113115
    114                 $listing_xml->addChild('home_listing_id', $post->ID);
     116                $home_listing_id = $post->ID;
     117                if ( $home_listing_id_field == 'fave_property_id' )
     118                {
     119                    if ( trim(get_post_meta( $post->ID, 'fave_property_id', TRUE )) != '' )
     120                    {
     121                        $home_listing_id = get_post_meta( $post->ID, 'fave_property_id', TRUE );
     122                    }
     123                }
     124                $listing_xml->addChild('home_listing_id', $home_listing_id);
    115125
    116126                $listing_xml->addChild('name', get_the_title());
     
    261271                        case "£": { $currency = 'GBP'; break; }
    262272                        case "$": { $currency = 'USD'; break; }
     273                        case "฿": { $currency = 'THB'; break; }
    263274                    }
    264275                }
  • houzez-property-feed/trunk/includes/format-functions.php

    r3358551 r3365729  
    35973597            'name' => __( 'Facebook', 'houzezpropertyfeed' ),
    35983598            'method' => 'url', // cron / realtime / url
    3599             'fields' => array(),
     3599            'fields' => array(
     3600                array(
     3601                    'id' => 'home_listing_id_field',
     3602                    'label' => __( 'Unique Property ID Field', 'houzezpropertyfeed' ),
     3603                    'type' => 'select',
     3604                    'options' => array(
     3605                        'post_id' => 'WordPress Post ID',
     3606                        'fave_property_id' => 'Property Reference Entered in Houzez',
     3607                    ),
     3608                    'tooltip' => 'If using the Houzez Property Reference this must be completely unique'
     3609                ),
     3610            ),
    36003611            'field_mapping_fields' => array(
    36013612                'name' => 'name',
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-property-finder.php

    r3323531 r3365729  
    268268                else
    269269                {
     270                    $rent_frequency = '';
     271
    270272                    $price = preg_replace("/[^0-9.]/", '', (string)$property->price);
    271273                    if ( is_numeric($price) )
    272274                    {
    273                         $price = round($price);
     275                        $price = round((float)$price);
    274276                    }
    275277
    276                     update_post_meta( $post_id, 'fave_property_price_prefix', '' );
    277                     update_post_meta( $post_id, 'fave_property_price', $price );
    278                    
    279                     $rent_frequency = '';
    280                     if ( $department == 'residential-lettings' )
     278                    if ( $department == 'residential-lettings' )
    281279                    {
    282                         $rent_frequency = 'pcm';
    283                         if ( isset($property->rental_period) )
     280                        $rent_frequency = 'pcm';
     281
     282                        if ( isset($property->price->yearly) )
     283                        {
     284                            $price = preg_replace("/[^0-9.]/", '', (string)$property->price->yearly);
     285                            if ( is_numeric($price) )
     286                            {
     287                                $price = round((float)$price);
     288                                $rent_frequency = 'pa';
     289                            }
     290                        }
     291
     292                        if ( isset($property->rental_period) )
    284293                        {
    285294                            switch ((string)$property->rental_period)
     
    290299                            }
    291300                        }
    292                     }
    293                     update_post_meta( $post_id, 'fave_property_price_postfix', $rent_frequency );
     301                    }
     302
     303                    update_post_meta( $post_id, 'fave_property_price_prefix', '' );
     304                    update_post_meta( $post_id, 'fave_property_price', $price );
     305                    update_post_meta( $post_id, 'fave_property_price_postfix', $rent_frequency );                   
    294306                }
    295307
     
    297309                update_post_meta( $post_id, 'fave_property_bathrooms', ( ( isset($property->bathroom) ) ? (string)$property->bathroom : '' ) );
    298310                update_post_meta( $post_id, 'fave_property_rooms', '' );
     311                update_post_meta( $post_id, 'fave_property_size', ( ( isset($property->size) && !empty((string)$property->size) ) ? (string)$property->size : '' ) );
     312                update_post_meta( $post_id, 'fave_property_size_prefix', ( ( isset($property->size) && !empty((string)$property->size) ) ? 'Sq Ft' : '' ) );
    299313                update_post_meta( $post_id, 'fave_property_garage', '' );
    300314                update_post_meta( $post_id, 'fave_property_id', (string)$property->reference_number );
  • houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-reaxml.php

    r3358551 r3365729  
    241241                                    {
    242242                                        $property->addChild('department', 'residential-lettings');
     243                                        $this->properties[] = $property;
     244                                    }
     245                                } // end foreach property
     246                            }
     247
     248                            if (isset($xml->land))
     249                            {
     250                                foreach ($xml->land as $property)
     251                                {
     252                                    $property_attributes = $property->attributes();
     253
     254                                    if ( $property_attributes['status'] == 'current' )
     255                                    {
     256                                        $property->addChild('department', 'residential-sales');
     257                                        $category = $property->addChild('category');
     258                                        $category->addAttribute('name', 'Land');
    243259                                        $this->properties[] = $property;
    244260                                    }
Note: See TracChangeset for help on using the changeset viewer.