In a large pot, fry ham in oil. Take out of the pot and set aside.
Add onions to the pot and saute until translucent.
Add vegetable or chicken stock and water to the pot and bring to a boil. Then add split peas, garlic, thyme and bay leaves and cook for about 45 minutes or until split peas fall apart into mush.
Add carrots, celery, potatoes and ham and continue cooking until vegetables are soft, about 30 minutes.