Skip to content

Instantly share code, notes, and snippets.

@propertyhive
propertyhive / snippet.php
Last active May 5, 2026 07:46 — forked from g-maclean/snippet.php
Property Hive - Real time feed - override To Rent price qualifier
add_filter( 'ph_rtdf_send_request_data', 'set_price_qualifier_for_commercial_rent_rtdf', 10, 2 );
function set_price_qualifier_for_commercial_rent_rtdf( $request_data, $post_id )
{
$property = new PH_Property( $post_id );
if ( ! $property )
{
return $request_data;
}
@propertyhive
propertyhive / snippet.php
Created January 29, 2025 13:21 — forked from g-maclean/snippet.php
PropertyHive - Reapit force use standard ID instead of alternateID
add_action( "propertyhive_property_imported_reapit_foundations_json", 'force_main_id_import', 10, 2 );
function force_main_id_import( $post_id, $property )
{
if ( isset($property['id']) && !empty($property['id']) )
{
update_post_meta( $post_id, '_reference_number', $property['id'] );
}
}
@propertyhive
propertyhive / trigger_portal_update.php
Last active November 25, 2024 11:56 — forked from CallumPrimeDev/trigger_portal_update.php
A custom endpoint that updates the price field and opening bid (custom field) for a given property
<?php
add_action('rest_api_init', function () {
register_rest_route('ppa/v1', '/update-property/', array(
'methods' => 'POST',
'callback' => 'update_property',
'permission_callback' => 'basic_auth_permission_check'
));
});