Avatar of curiouswebster
Flag for United States of America

asked on 

WordPress/PHP has me stuck with no logging...

When I check the debug.log, I see:
Step 1
Step 2

Here is the code:
error_log("Step 1", 0);

add_action( 'save_post', 'ajax_test' );
function ajax_test() {   
    error_log( "ajax_test entered", 0);
error_log("Step 2", 0);

Open in new window

So, this means EITHER:
1) error_log() does not work in an action
2) The code does not enter the function, ajax_test()

Is there a plug-in needed for logging inside of an action? Will this one help?

Is there another way to log data, besides error_log()? Please let me know...

Web DevelopmentPHPWeb Languages and StandardsScripting LanguagesWordPress

Avatar of undefined
Last Comment

8/22/2022 - Mon