🐛 Issue: Action Scheduler completing but wp_mail() never called 🔍 Enhanced Debugging: - Log sendNow() entry with all arguments - Log argument type and value - Handle array vs string arguments (Action Scheduler compatibility) - Log payload retrieval status - Log wp_mail() call and result - Log WooEmailOverride disable/enable - Check database for option existence if not found - Log hook registration on init 📝 Debug Output: [WooNooW MailQueue] Hook registered [WooNooW MailQueue] sendNow() called with args [WooNooW MailQueue] email_id type: string/array [WooNooW MailQueue] email_id value: xxx [WooNooW MailQueue] Processing email_id: xxx [WooNooW MailQueue] Payload retrieved - To: xxx, Subject: xxx [WooNooW MailQueue] Disabling WooEmailOverride [WooNooW MailQueue] Calling wp_mail() now... [WooNooW MailQueue] wp_mail() returned: TRUE/FALSE [WooNooW MailQueue] Re-enabling WooEmailOverride [WooNooW MailQueue] Sent and deleted email ID 🎯 This will reveal: 1. If sendNow() is being called at all 2. What arguments Action Scheduler is passing 3. If payload is found in wp_options 4. If wp_mail() is actually called 5. If wp_mail() succeeds or fails
4.5 KiB
4.5 KiB