Created
November 28, 2022 12:06
-
-
Save propertyhive/b981ff2a168a2c96c4e066d068196469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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