It's not true. The biological bases of thinking are located in the brain. Heart is just an automatic blood pump.
The nature of thinking capabilities and the sequence in which they appear have been well established on two research fronts. The biological basis underlying their appearance is established by periodic increases in brain size, brain weight, cellular growth within the brain, electrical functioning with the brain, and head circumference. The psychological basis is established through evidence of the individual's increasing capacity to deal with independent ideas and to exhibit the same kinds of behaviors as other individuals within two- to three-year ranges and, with growth, the individual's ability to replace naive with more sophisticated views.
Source: Lawrence F. Lowery. The Biological Basis of Thinking and Learning. 1998
The heart is a hollow, muscular organ about the size of a fist. It is responsible for pumping blood through the blood vessels by repeated, rhythmic contractions. The heart is composed of cardiac muscle, an involuntary muscle tissue that is found only within this organ.
Source: WikiBooks. Human Physiology/The cardiovascular system
You can say that heart "thinks" for itself because its contractions are not dependent on the nervous system but are influenced by it:
Automaticity is an intrinsic property of some types of cardiac tissues, like the nodes and the conducting fibers. Automatic cells are characterized by the appearance, during diastole, of a slow depolarization which is capable of reaching threshold and generate an action potential. This depolarization is the so-called slow diastolic depolarization, or pacemaker potential. Tissues with automaticity do not have the same intrinsic firing frequency, which determines the existence of a true pacemaker; normally this role is assumed by the sinus node and several latent, or subsidiary pacemakers. ... Some of the most important factors that modulate heart rate include the neurotransmitters of the automatic nervous system, the plasmatic levels of some ions, like potassium and calcium, and changes in the intrinsic properties of the membrane, like the influence of heart rate on the activity of the sodium pump.
Source: Valenzuela F, Kabela E. Automatism: an intrinsic property of cardiac tissues. Arch Inst Cardiol Mex. 1984 Nov-Dec;54(6):601-13.
Heart has been associated with emotions since Middle Ages. The first known depiction of a heart as a symbol of romantic love dates to the 1250s. Hearts can be seen on the bible Jesus holds in the Empress Zoe mosaic in the Hagia Sophia in Istanbul. It probably dates from 1239 (source).
Emotions are the most basic thing of the human being and, therefore, they constitute
something intrinsic to our lives. Above all, the heart stands out for being considered the
place where they are located. Therefore, we can establish the metaphor “THE HEART IS A
CONTAINER OF EMOTIONS”. Among them, love is the outstanding one. However, the fact
that emotions are located in this body part does not constitute a universal, since there
are other languages and cultures in which they are metaphorically reificated in other
body parts. Turkish, for example, locates them in the liver, that is why the expression
“My liver, my soul” may be striking to us. Another case is Nigerian English, language
which considers the belly the seat of emotions.
Source: Regina Gutiérrez Pérez. A Cross-Cultural Analysis of Heart Metaphors. Revista Alicantina de Estudios Ingleses 21 (2008): 25-56