Easy Digital Downloads – How to use hooks correctly?

You don’t put do_action() anywhere. The plugin runs that when that action occurs. You just need to hook into it with add_action(). The way hooks work is documented here.

If you’re not sure when or how a plugin’s own hooks, such as this one, are fired, then you’ll need to contact the plugin developer, or consult its developer documentation.