Automatically attach Invoice PDF to confirmation receipt based on the gl...

...obal setting
In this function we are only using contribution id from $values, can't we pass only contribution id to this function?