The term "Political economy" was used to denote the subject that examined production, exchange(the acts of buying and selling), and distribution (factor incomes) and their relationships to laws, customs and and activities of government.
It was described as wealth of nations by Adam Smith and other writers like John Stuart Mill.
It developed in the 18th century as the study of the economies of states (states were known as polities, hence the word "political" in "political economy").
Even though it is wealth of nations, in a capitalist economy it is the actions of individual consumers and producers that would be come ultimately the gross domestic product. Therefore, principles of political economy developed principles of decision making by individual producers and consumers first.