• Resolved RussSD


    How do I set the Area to default as Acres instead of S. Ft.?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Elena



    You can just create an attribute and call it Area in Acres and fill it out 🙂

    This should take care of the problem.

    Thread Starter RussSD


    Thank you Elena. I was expecting there to something different but this solution works.



    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 m² */
    //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&sup2", 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&sup2″ bit stands for m², 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 5 years ago by xvarea.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change Area to Acres’ is closed to new replies.