Refactored edd_add_to_cart() for #688