When the cause of action, after the commencement of the action, by assignment, or in any other manner, becomes the property of a person not a party thereto, and the prosecution or defense is thereafter continued, such person shall be liable for the costs in the same manner as if he or she were a party, and payment thereof may be enforced by execution.