For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
He commanded it before they ate the fruit.
Genesis 1:27-28
27
So God created man in His own image;
He created him in the image of God;
He created them male and female.
28
God blessed them, and God said to them, “Be fruitful, multiply, fill the earth, and subdue it. Rule the fish of the sea, the birds of the sky, and every creature that crawls on the earth.”
Genesis 3:6
6
Then the woman saw that the tree was good for food and delightful to look at, and that it was desirable for obtaining wisdom. So she took some of its fruit and ate it; she also gave some to her husband, who was with her, and he ate it.
Holman Christian Standard Bible (HCSB) used.