Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Last active January 29, 2025 19:29
Show Gist options
  • Save g-maclean/63f6a74333079a48c5b55c58cac5c609 to your computer and use it in GitHub Desktop.
Save g-maclean/63f6a74333079a48c5b55c58cac5c609 to your computer and use it in GitHub Desktop.
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'] );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment