Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created September 2, 2016 11:36
Show Gist options
  • Save propertyhive/ca8ad83260a069dbe62630ee42eb124d to your computer and use it in GitHub Desktop.
Save propertyhive/ca8ad83260a069dbe62630ee42eb124d to your computer and use it in GitHub Desktop.
Amend Rightmove request pre-send
// Add lettings fees on property to RTDF feed
add_filter( 'ph_rtdf_send_request_data', 'add_property_lettings_fees_to_rtdf_feed', 10, 2 );
function add_property_lettings_fees_to_rtdf_feed( $request_data, $post_id )
{
$property_lettings_fees = get_post_meta( $post_id, '_lettings_fees', TRUE );
if ($property_lettings_fees != '')
{
$request_data['property']['price_information']['administration_fee'] = $property_lettings_fees;
}
return $request_data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment