wpsight / wpcasa

WPCasa WordPress Real Estate
https://wpcasa.com
GNU General Public License v2.0
42 stars 23 forks source link

`_list_not_available` meta field values not unified in db #97

Open florianrusch opened 5 years ago

florianrusch commented 5 years ago

I was searching for the attribute which define if a listing is available or already sold or rented. On my search I've discovered, that the _list_not_available metadata field of a listing is not unified in the database. There are three different values which I saw: 0, 1, on.

In the php function is_listing_not_available which handles this field is a migration integrated from the old field _price_sold_rented. Maybe this is the reason why we have three different values?

I would suggest to add here maybe another migration to bring this values to a consistent type (0, 1).

https://github.com/wpsight/wpcasa/blob/c983038daca4561e8f6292dc19405b4d4da3e9d5/wpcasa/includes/class-wpsight-listings.php#L1323-L1363