adds new parameter to function clearSession because powermail 2.0.10 changes the number of params
add some conditions, so wt_cart_paypal plugin can control creating invoice and sending emails