Canning method
Wash and rinse pint canning jars; keep hot until ready to use. Prepare lids according to the manufacturer’s directions.
Wash, peel, and cut the chayote and pears into 1/2-inch cubes, discarding cores and seeds. Chop the onions and peppers.
Combine vinegar, water, sugar, salt, and spices in a Dutch oven or large saucepot. Bring to a boil, stirring to dissolve the sugar. Add the chopped onions and peppers; return to a boil and boil for 2 minutes, stirring occasionally. Add the cubed chayote and pears; return to the boiling point and turn off the heat.
Fill the hot solids into clean, hot pint jars to within 1 inch of the top. Cover with boiling-hot cooking liquid, leaving 1/2-inch headspace. Remove air bubbles and adjust the headspace if needed. Wipe the jar rims with a dampened clean paper towel; apply two-piece metal canning lids.
Process hot-packed pint jars in a boiling-water canner for 15 minutes at 0–1,000 feet, 20 minutes at 1,001–6,000 feet, or 25 minutes above 6,000 feet.
Let the jars cool undisturbed for 12–24 hours, then check the seals.