easydigitaldownloads/Easy-Digital-Downloads — pull request #2381 by somewebmedia (2014-06-17 15:33:30+00:00)
Title: Global ajax functions

Created one global function edd_ajax() that receives data from all other
functions and delivers the request. Each ajax call has it's own function
(edd_add_to_cart, edd_remove_from_cart, edd_update_quantity...), and
accepts it's properties, than calls edd_ajax(). Each of them accepts two
extra parameters, success and fail. They are the ajax callback functions
and are optional.

This way developers can use those functions without the need to know or
write their own ajax requests, so they can manipulate HTML on callback
in their own way. Default EDD button events and callbacks stayed the
same, but also go through the new functions.

!important this should be more properly tested!