Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save propertyhive/6ce20817052b852aa0c49b0bdb77f862 to your computer and use it in GitHub Desktop.
Save propertyhive/6ce20817052b852aa0c49b0bdb77f862 to your computer and use it in GitHub Desktop.
add_action( "propertyhive_property_imported_blm", "set_exempt_custom_field", 10, 2 );
function set_exempt_custom_field($post_id, $property)
{
if ( isset($property['COUNCIL_TAX_EXEMPT']) && $property['COUNCIL_TAX_EXEMPT'] == '1' )
{
update_post_meta( $post_id, '_council_tax_exempt', 'Yes' );
}
else
{
update_post_meta( $post_id, '_council_tax_exempt', 'No' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment