Created
July 30, 2025 06:43
-
-
Save propertyhive/d585d8a5659460e541d2deab0286b96c 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( "houzez_property_feed_property_imported_street", 'convert_sq_m_to_sq_ft', 10, 4 ); | |
| function convert_sq_m_to_sq_ft( $post_id, $property, $import_id, $instance_id ) | |
| { | |
| if ( isset($property['attributes']['floor_area']) && !empty($property['attributes']['floor_area']) ) | |
| { | |
| $floor_area = $property['attributes']['floor_area']; | |
| // convert | |
| $floor_area = $floor_area * 10.764; | |
| update_post_meta( $post_id, 'fave_property_size', $floor_area ); | |
| update_post_meta( $post_id, 'fave_property_size_prefix', 'Sq Ft' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment