Back in 2010 the Israeli Air Force decided to halt upgrading its older AH-64A Apache helicopter gunships to the all-weather AH-64D "Longbow" version. At that point 17 of 47 Israeli AH-64s had been upgraded. The issue was cost and eventually less expensive Israeli sources were found for the electronics needed to achieve many of the capabilities of the D model. Using Israeli electronics also meant it was easier integrating AH-64 systems with Israeli made communications and battle management systems. This also reduced the cost as has the decision to switch to Israeli missiles instead of the American Hellfire.
With the improved electronics the AH-64 can be used at night and in bad weather, and be able to spot things on the ground and far away (about ten kilometers). Up to sixteen missiles (plus its 30mm cannon) can be carried, and these weapons are particularly useful for urban warfare, where you want to minimize civilian casualties. It was the civilian casualties sometimes caused when Israeli AH-64s were used against Islamic terrorists in Gaza that created political opposition to the U.S. selling Israel more AH-64s or allowing them to upgrade using American suppliers.
Since 2009 Israel has used the original AH-64A and the few AH-64Ds it received from the U.S. against Islamic terrorist group Hamas in Gaza. Based on past experience, Israel developed tactics that integrated the AH-64s closely with the ground units. The Israelis examined how the U.S. has been using AH-64s in Iraq and Afghanistan, and picked up some tips there as well. Now the Israelis are using all that knowledge to upgrade and refurbish their AH-64s with Israeli equipment and ideas.
Israel currently has 44 AH-64s and 33 older (but often upgraded) AH-1 helicopter gunships in service.