easydigitaldownloads/Easy-Digital-Downloads — pull request #2590 by dannyvankooten (2014-09-07 14:29:39+00:00)
Title: Find state field (input or select) in complete form context.

Previously, when someone was using custom checkout templates with additional wrapping elements the jQuery selector would not be able to replace the `state` field with the AJAX response.

This change searches the complete form for the `input` or `select` element with `.card_state`.

Also added a small check to see if headers are already sent before starting the session.