bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Unexpected Trace shutdown output in CSV downloads from EDD #41

Closed bobbingwide closed 4 years ago

bobbingwide commented 8 years ago

The bw_trace_ok_to_echo() function does not detect the fact that a CSV file is being downloaded in EDD. The CSV file therefore gets corrupted. We need a mechanism to prevent this from happening. There's probably an action hook we can detect.

bobbingwide commented 4 years ago

Hasn’t this been fixed in #78

bobbingwide commented 4 years ago

The request for an EDD Export is /wp-admin/edit.php?post_type=download&page=edd-tools&tab=import_export with the following values:

_REQUEST Array
(
    [post_type] => download
    [page] => edd-tools
    [tab] => import_export
    [edd_action] => export_settings
    [edd_export_nonce] => 73a8dcbe83
    [_wp_http_referer] => /wp-admin/edit.php?post_type=download&page=edd-tools&tab=import_export
    [submit] => Export
)

So we can just check for edd_action