Updated the get_custom_terms method to get options directly from the database.