Last active
February 15, 2026 13:26
-
-
Save propertyhive/46bf8e57fe8c17b34f728adfec5339f2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_v2_property_imported", 'hardcode_title_and_to_eur', 10, 2 ); | |
| function hardcode_title_and_to_eur($post_id, $property) | |
| { | |
| // Set title to room type | |
| $my_post = array( | |
| 'ID' => $post_id, | |
| 'post_title' => wp_strip_all_tags( $property['room_type'] ), | |
| 'post_excerpt' => $property['description'], | |
| 'post_content' => '', | |
| 'post_status' => 'publish', | |
| ); | |
| wp_update_post( $my_post ); | |
| // Set currency | |
| update_post_meta($post_id, '_currency', 'EUR'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment