I'm using formidable form although I tried these code with contact form 7 too...I created a custom plugin with this code inside
<?php
/**
Plugin Name: testplugin
Plugin URI: xxxxxx
Description: test
Author: xxxxxx
Version: 0.01
Author URI: xxxxx
*/
if (!function_exists('write_log')) {
function write_log ( $log ) {
if ( true === WP_DEBUG ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}
}
write_log(">>>>>>> running plugin <<<<<<<<<<<<");
add_action('frm_after_create_entry', 'sample_subm', 20, 2);
function sample_subm($entry_id, $form_id){
write_log(">>>>>>> RUNING sample_subm<<<<<<<<<<<<");
}
}
I follow this code
then I submit several times my form, I can see several lines in my log file with the text >>>>>>> running plugin <<<<<<<<<<<< but not one with the text >>>>>>> RUNING sample_subm<<<<<<<<<<<<
I've also tested contact form 7 (using its specific hook) and the results are the same, I can't see than the events be fired...
I'm missing something?..how can I debug/find error in this case?..are there any plugin which tell me it that particular hook is running or not??
thank you so much! please let me know if you need more info