Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created November 28, 2022 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save propertyhive/b981ff2a168a2c96c4e066d068196469 to your computer and use it in GitHub Desktop.
Save propertyhive/b981ff2a168a2c96c4e066d068196469 to your computer and use it in GitHub Desktop.
add_action( "propertyhive_property_imported_jet", 'import_completion_date', 10, 2 );
function import_completion_date($post_id, $property)
{
$completion_date = '';
if ( isset($property->CompletionDate) && !empty( (string)$property->CompletionDate ) )
{
$completion_date = (string)$property->CompletionDate;
}
update_post_meta( $post_id, '_completion_date', $completion_date );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment