The listed solution is not viable in many cases, for example if you painfully imported a large database of properties from somewhere else.
You could remove the add_square_foot filter, which is in the /lib/default_api.php
Of course you should NEVER edit the plugin’s files: your changes might break something or btw be completely wiped from the next update. So just paste this snippet in your child theme functions.php :
/* Change sq. ft. to m2 */
//disable filter add_square_foot
function disable_add_sqft() {
remove_filter( "wpp_stat_filter_area", 'add_square_foot' );
}
add_filter( 'wp_loaded', 'disable_add_sqft' );
//create filter add_square_meter
function add_square_meter( $area ) {
return $area . __( " m²", ud_get_wp_property()->domain );
}
add_filter( "wpp_stat_filter_area", 'add_square_meter');
This will override the function which appends sq. ft. to the area. Please note that the ” m²″ bit stands for m2, but you can substitute that with any other notation or unit that you intend to use, such as ‘mq’ or ‘acres’ or anything else.
-
This reply was modified 8 years, 1 month ago by
xvarea.