easy-digital-downloads
easy-digital-downloads copied to clipboard
Allow edd_record_download_in_log to be short-circuited (disabled) via a conditional filter
Enhancement Request
Explain your enhancement (please be detailed)
I am building a custom download add-on for EDD, that uses edd_process_download function. I need a way to disable the log being recorded, because I am inserting own logs and having duplicates does not make sense.
It would probably make the best sense to add a conditional filter in the edd_record_download_in_log function itself.
Justification or use case
Third-party plugin development.
Probably worth mentioning that the function gets the order, but does not validate it actually exists which will cause it to fail if an order is deleted or destroyed.
I have submitted a PR for this: #9324
@cklosowski any chance of this one getting merged? For a new extension I am putting together!
@davidsherlock This is going to be solved in #8450. We are adding filters for each of the log types with the filters:
edd_should_log_{$data['object_type']}
edd_should_log_file_download
edd_should_log_api_request
We're working on a PR for it in #9397.