Changeset 3358551
- Timestamp:
- 09/09/2025 11:48:48 AM (7 months ago)
- Location:
- houzez-property-feed/trunk
- Files:
-
- 1 added
- 7 edited
-
README.txt (modified) (3 diffs)
-
houzez-property-feed.php (modified) (2 diffs)
-
includes/class-houzez-property-feed-import.php (modified) (1 diff)
-
includes/class-houzez-property-feed-process.php (modified) (4 diffs)
-
includes/format-functions.php (modified) (3 diffs)
-
includes/import-formats/class-houzez-property-feed-format-behomes.php (added)
-
includes/import-formats/class-houzez-property-feed-format-reaxml.php (modified) (1 diff)
-
includes/import-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
houzez-property-feed/trunk/README.txt
r3351871 r3358551 4 4 Requires at least: 3.8 5 5 Tested up to: 6.8 6 Stable tag: 2.5.2 77 Version: 2.5.2 76 Stable tag: 2.5.28 7 Version: 2.5.28 8 8 Homepage: https://houzezpropertyfeed.com 9 9 License: GPLv3 … … 27 27 * Apimo 28 28 * BDP 29 * Behomes 29 30 * BLM 30 31 * Bridge - RESO MLS API Provider (beta) … … 143 144 == Changelog == 144 145 146 = 2.5.28 - 2025-09-09 = 147 * Added support for importing properties from Behomes 148 * Added support for land property to ReaXML imports 149 * Added a 'Referer' header to OSM geocoding requests to prevent getting blocked 150 * Added filter 'houzez_property_feed_clean_price_on_import' to disable price cleansing when importing price using custom field mappings 151 145 152 = 2.5.27 - 2025-08-28 = 146 153 * Send price qualifier in RTDF exports -
houzez-property-feed/trunk/houzez-property-feed.php
r3351871 r3358551 4 4 * Plugin Uri: https://houzezpropertyfeed.com 5 5 * Description: Automatically import properties to Houzez from estate agency CRMs and export to portals 6 * Version: 2.5.2 76 * Version: 2.5.28 7 7 * Author: PropertyHive 8 8 * Author URI: https://wp-property-hive.com … … 20 20 * @var string 21 21 */ 22 public $version = '2.5.2 7';22 public $version = '2.5.28'; 23 23 24 24 /** -
houzez-property-feed/trunk/includes/class-houzez-property-feed-import.php
r3351871 r3358551 1293 1293 elseif ( $and_rules['houzez_field'] == 'fave_property_price' && $result != '' ) 1294 1294 { 1295 $explode_result = explode(" ", $result); 1296 $new_result = array(); 1297 foreach ( $explode_result as $word ) 1298 { 1299 $price_separators = hpf_determine_number_separators($word); 1300 $word = str_replace($price_separators['thousand'], '', $word); 1301 $word = str_replace($price_separators['decimal'], '.', $word); 1302 1303 $new_result[] = $word; 1304 } 1305 $result = implode(" ", $new_result); 1295 if ( apply_filters( 'houzez_property_feed_clean_price_on_import', true ) === true ) 1296 { 1297 $explode_result = explode(" ", $result); 1298 $new_result = array(); 1299 foreach ( $explode_result as $word ) 1300 { 1301 $price_separators = hpf_determine_number_separators($word); 1302 $word = str_replace($price_separators['thousand'], '', $word); 1303 $word = str_replace($price_separators['decimal'], '.', $word); 1304 1305 $new_result[] = $word; 1306 } 1307 1308 $result = implode(" ", $new_result); 1309 } 1306 1310 } 1307 1311 -
houzez-property-feed/trunk/includes/class-houzez-property-feed-process.php
r3294397 r3358551 566 566 $request_url = "https://nominatim.openstreetmap.org/search?format=json&limit=1&countrycodes=" . strtolower($country) . "&addressdetails=1&q=" . urlencode(implode(", ", $address)); 567 567 568 $response = wp_remote_get($request_url); 569 570 if ( !is_wp_error( $response )) 571 { 572 if ( is_array( $response ) ) 573 { 574 $body = wp_remote_retrieve_body( $response ); 575 $json = json_decode($body, true); 576 577 if ( !empty($json) && isset($json[0]['lat']) && isset($json[0]['lon']) ) 578 { 579 $lat = $json[0]['lat']; 580 $lng = $json[0]['lon']; 581 582 if ($lat != '' && $lng != '') 583 { 584 update_post_meta( $post_id, 'houzez_geolocation_lat', $lat ); 585 update_post_meta( $post_id, 'houzez_geolocation_long', $lng ); 586 587 return array( $lat, $lng ); 588 } 589 } 590 else 591 { 592 $this->log_error( 'No co-ordinates returned for the address provided: ' . implode( ", ", $address ), $agent_ref, $post_id ); 568 $response = wp_remote_get( 569 $request_url, 570 array( 571 'headers' => array( 572 'Referer' => home_url(), 573 ), 574 ) 575 ); 576 577 if ( is_wp_error( $response )) 578 { 579 $this->log_error( 'Error returned from geocoding service: ' . $response->get_error_message(), $agent_ref, $post_id ); 580 sleep(2); // Sleep due to throttling limits 581 return false; 582 } 583 584 if ( wp_remote_retrieve_response_code($response) !== 200 ) 585 { 586 $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when geocoding address ' . implode(", ", $address) . '. Error message: ' . wp_remote_retrieve_response_message($response) ); 587 sleep(2); // Sleep due to throttling limits 588 return false; 589 } 590 591 if ( is_array( $response ) ) 592 { 593 $body = wp_remote_retrieve_body( $response ); 594 $json = json_decode($body, true); 595 596 if ( !empty($json) && isset($json[0]['lat']) && isset($json[0]['lon']) ) 597 { 598 $lat = $json[0]['lat']; 599 $lng = $json[0]['lon']; 600 601 if ($lat != '' && $lng != '') 602 { 603 update_post_meta( $post_id, 'houzez_geolocation_lat', $lat ); 604 update_post_meta( $post_id, 'houzez_geolocation_long', $lng ); 605 606 return array( $lat, $lng ); 593 607 } 594 608 } 595 609 else 596 610 { 597 $this->log_error( ' Failed to parse JSON response from OSM Geocoding service.', $agent_ref, $post_id );611 $this->log_error( 'No co-ordinates returned for the address provided: ' . implode( ", ", $address ), $agent_ref, $post_id ); 598 612 } 599 613 } 600 614 else 601 615 { 602 $this->log_error( ' Error returned from geocoding service: ' . $response->get_error_message(), $agent_ref, $post_id );603 } 604 605 sleep( 1); // Sleep due to throttling limits616 $this->log_error( 'Failed to parse JSON response from OSM Geocoding service.', $agent_ref, $post_id ); 617 } 618 619 sleep(2); // Sleep due to throttling limits 606 620 607 621 return false; … … 664 678 $this->log_error( 'Invalid response when trying to obtain co-ordinates', $agent_ref, $post_id ); 665 679 } 680 681 sleep(2); // Sleep due to throttling limits 666 682 } 667 683 else … … 674 690 $this->log( 'Not performing Google Geocoding request as no API key present in settings', $agent_ref, $post_id ); 675 691 } 676 677 sleep(1); // Sleep due to throttling limits678 692 679 693 return false; … … 791 805 // check lat and lng set, and use that instead of doing geocoding 792 806 $lat = get_post_meta($post_id, 'houzez_geolocation_lat', true); 793 $lng = get_post_meta($post_id, 'houzez_geolocation_l ng', true);807 $lng = get_post_meta($post_id, 'houzez_geolocation_long', true); 794 808 if ( !empty($lat) && !empty($lng) ) 795 809 { -
houzez-property-feed/trunk/includes/format-functions.php
r3325700 r3358551 481 481 'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/bdp/', 482 482 'warnings' => array_filter( array( $curl_warning ) ), 483 ), 484 'behomes' => array( 485 'name' => __( 'Behomes', 'houzezpropertyfeed' ), 486 'fields' => array( 487 array( 488 'id' => 'api_key', 489 'label' => __( 'API Key', 'houzezpropertyfeed' ), 490 'type' => 'text', 491 'tooltip' => __( 'Your API key can be found in your Behomes account under "My Integrations"', 'houzezpropertyfeed' ) 492 ), 493 array( 494 'id' => 'property_type', 495 'label' => __( 'Properties To Import', 'houzezpropertyfeed' ), 496 'type' => 'select', 497 'options' => array( 498 '' => __( 'All Properties', 'houzezpropertyfeed' ), 499 'Off-plan' => __( 'Off-Plan Properties', 'houzezpropertyfeed' ), 500 'Secondary' => __( 'Secondary Properties', 'houzezpropertyfeed' ) 501 ), 502 'default' => 'offplan' 503 ), 504 /* array( 505 'id' => 'language', 506 'label' => __( 'Language', 'houzezpropertyfeed' ), 507 'type' => 'select', 508 'options' => array( 509 'en' => __( 'English', 'houzezpropertyfeed' ), 510 'ru' => __( 'Russian', 'houzezpropertyfeed' ), 511 'de' => __( 'German', 'houzezpropertyfeed' ), 512 'fr' => __( 'French', 'houzezpropertyfeed' ), 513 'hi' => __( 'Hindi', 'houzezpropertyfeed' ), 514 'ar' => __( 'Arabic', 'houzezpropertyfeed' ), 515 'tr' => __( 'Turkish', 'houzezpropertyfeed' ), 516 'ch' => __( 'Chinese', 'houzezpropertyfeed' ), 517 'it' => __( 'Italian', 'houzezpropertyfeed' ), 518 'pl' => __( 'Polish', 'houzezpropertyfeed' ) 519 ), 520 'default' => 'en' 521 ),*/ 522 array( 523 'id' => 'unit', 524 'label' => __( 'Unit System', 'houzezpropertyfeed' ), 525 'type' => 'select', 526 'options' => array( 527 'meter' => __( 'Meters', 'houzezpropertyfeed' ), 528 'foot' => __( 'Feet', 'houzezpropertyfeed' ) 529 ), 530 'default' => 'meter' 531 ), 532 /*array( 533 'id' => 'launch_type', 534 'label' => __( 'Launch Type (Off-Plan Only)', 'houzezpropertyfeed' ), 535 'type' => 'radio', 536 'options' => array( 537 'all' => __( 'All Launch Types', 'houzezpropertyfeed' ), 538 'Launch_soon' => __( 'Launch Soon', 'houzezpropertyfeed' ), 539 'New_launch' => __( 'New Launch', 'houzezpropertyfeed' ), 540 'Popular' => __( 'Popular', 'houzezpropertyfeed' ), 541 'Assignment' => __( 'Assignment', 'houzezpropertyfeed' ), 542 'Sold_out' => __( 'Sold Out', 'houzezpropertyfeed' ) 543 ), 544 'default' => 'all' 545 ),*/ 546 array( 547 'id' => 'developer', 548 'label' => __( 'Developer(s)', 'houzezpropertyfeed' ), 549 'type' => 'text', 550 'placeholder' => 'e.g., Damac, Azizi, Sobha', 551 'tooltip' => __( 'Filter properties by developer name. Leave empty to import all developers', 'houzezpropertyfeed' ) 552 ) 553 ), 554 'address_fields' => array( 'district' ), 555 'taxonomy_values' => array( 556 /*'sales_status' => array( 557 558 ), 559 'lettings_status' => array( 560 561 ),*/ 562 'property_type' => array( 563 'Apartment' => 'Apartment', 564 'Villa' => 'Villa', 565 'Townhouse' => 'Townhouse', 566 ), 567 ), 568 'contact_information_fields' => array( 569 'organizationName', 570 ), 571 'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/behomes/', 483 572 ), 484 573 'blm_local' => array( … … 2248 2337 'Retirement' => 'Retirement', 2249 2338 'ServicedApartment' => 'ServicedApartment', 2339 'Land' => 'Land', 2250 2340 'Other' => 'Other', 2251 2341 ) … … 2293 2383 'Retirement' => 'Retirement', 2294 2384 'ServicedApartment' => 'ServicedApartment', 2385 'Land' => 'Land', 2295 2386 'Other' => 'Other', 2296 2387 ) -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-reaxml.php
r3351871 r3358551 71 71 { 72 72 $property->addChild('department', 'residential-lettings'); 73 $this->properties[] = $property; 74 } 75 } // end foreach property 76 } 77 78 if (isset($xml->land)) 79 { 80 foreach ($xml->land as $property) 81 { 82 $property_attributes = $property->attributes(); 83 84 if ( $property_attributes['status'] == 'current' ) 85 { 86 $property->addChild('department', 'residential-sales'); 87 $category = $property->addChild('category'); 88 $category->addAttribute('name', 'Land'); 73 89 $this->properties[] = $property; 74 90 } -
houzez-property-feed/trunk/includes/import-functions.php
r3325700 r3358551 455 455 break; 456 456 } 457 case "behomes": 458 { 459 // includes 460 require_once dirname( __FILE__ ) . '/import-formats/class-houzez-property-feed-format-behomes.php'; 461 462 $import_object = new Houzez_Property_Feed_Format_Behomes( $instance_id, $import_id ); 463 464 break; 465 } 457 466 case "blm_local": 458 467 {
Note: See TracChangeset
for help on using the changeset viewer.