Acquisition Survey Developer Info

Acquisition Survey offers a number of functions and filters that allow it to be extended.

Recorded acquisition methods are stored in the payment meta with the 'meta_key' of _edd_payment_acquisition_method.

You can retrieve a payments acquisition method with the call:

edd_get_payment_meta( $payment_id, '_edd_payment_acquisition_method', false );

Filters

edd_acq_get_methods()
// This filters the array of acquisition methods after they are returned from the database. Methods are in the form of a numerically indexed array.

// Example
array(1) {
	array(2) {
		'name'  => 'Customer Facing Name',
		'value' => 'payment-meta-record'
	}
}
edd_acq_record_acquisition_method()
// Runs just before saving the acquisition method into the payment meta.
edd_acq_method_sales()
// Runs just before returning the number of sales for a requested acquisition method 'value'.
edd_acq_method_earnings()
// Runs just before returning the total earnings for a requested acquisition method 'value'.