Created
March 31, 2025 21:15
-
-
Save propertyhive/2ab0b41a94a54f962250311347c91eee 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_sturents_property_imported", 'set_status_on_sturents', 10, 2 ); | |
function set_status_on_sturents( $post_id, $property ) | |
{ | |
wp_suspend_cache_invalidation( true ); | |
wp_defer_term_counting( true ); | |
wp_defer_comment_counting( true ); | |
wp_set_post_terms( $post_id, 5, 'availability' ); // Change 5 accordingly to new 'For Sale' status | |
wp_suspend_cache_invalidation( false ); | |
wp_defer_term_counting( false ); | |
wp_defer_comment_counting( false ); | |
} | |
add_filter( 'propertyhive_add_property_availability_change_note', 'disable_history_logging' ); | |
function disable_history_logging( $disabled ) | |
{ | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment