How to change default payment status in EDD for a single Gravity Form


I am using Gravity Forms (obviously!) with Easy Digital Downloads through the Gravity Forms Checkout plugin. For those who aren’t familiar with it, this plugin uses GF for the checkout process but records the payment and product information through EDD, which offers enhanced reporting and other benefits.

The default payment status in EDD is pending, but this code allows one to change the default payment status to completed:


I need a way to do this for only a single Gravity Form on my site. As written, the code behaves in an all-or-nothing manner for the entire site. I would appreciate suggestions on how to make this happen.