awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
863 stars 474 forks source link

Trigger JS event on checkout success. #9735

Open zutigrm opened 4 months ago

zutigrm commented 4 months ago

Fixes #

Proposed Changes:

  1. There is a JS event triggered in case of checkout failure edd_checkout_error, but not the one for successful purchase. It will be very handy to have one, to align with other plugins that need to listen to this action as well, like in our case for custom tracking.

Please do not submit PRs with minified CSS or JS files. This is managed at the time of release by the Core Team

zutigrm commented 4 months ago

Hi @cklosowski , would it be possible to have something like this?

cklosowski commented 3 months ago

@zutigrm I think this has some potential but we need to do some testing and compatibility research for all different gateway situations (off-site, on-site, etc) as well as ensuring that having this trigger doesn't open up the potential for breaking the checkout processing if the Javascript that hooks into the trigger fails.

We'll look at this and do some testing to see what we feel comfortable with.