Skip to content

Instantly share code, notes, and snippets.

@stevenhoney
Created August 23, 2016 12:05
Show Gist options
  • Save stevenhoney/25fb46ec87af9a7d0f641b5357a7b601 to your computer and use it in GitHub Desktop.
Save stevenhoney/25fb46ec87af9a7d0f641b5357a7b601 to your computer and use it in GitHub Desktop.
/* Make sure you have the following in your wp-config.php
* define('WP_DEBUG', true);
* define('WP_DEBUG_LOG', true);
* define('WP_DEBUG_DISPLAY', false);
*
*You can then see the available variables logged in http://www.example.com/wp-content/debug.log
*/
add_filter( 'gform_post_data', 'post_data_debugging', 10, 3 );
function post_data_debugging( $post_data, $form, $entry ) {
$data_log = print_r($post_data, true);
$data_log .= print_r($form, true);
$data_log .= print_r($entry, true);
error_log( $data_log );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment