Final answer:
The correct sentence is 'Ayer lo compré.'
Step-by-step explanation:
The correct sentence that uses the direct object pronoun to substitute the direct object is:
Ayer lo compré.
In this sentence, 'lo' is the direct object pronoun that replaces 'el jabón' (the soap).
Learn more about Correct use of direct object pronouns in Spanish