wp_trash_post retrashes already trashed comments?
wp_trash_post retrashes already trashed comments?
wp_trash_post retrashes already trashed comments?
Try to add some code to the functions.php like: add_action(‘publish_post’,’send_email’); function send_email() { // write some code with wp_mail function. } I think you can use the $post to get the post info. For comments I guess you can use: add_action(‘comment_post’, ‘send_email’); Let me know if you need some more help!
This workaround is far from ideal, but it gets the job done. On $mail_sent == true set a post meta. In the __construct function add a callback to the admin_head action that checks whether the post meta has been set. If yes, delete the post meta and add the admin_notices action with the callback to … Read more
Creating a Scheduled Event First we’ll create a function that will schedule our event. Mine is called “mycronjob” and it will run once every day. All this code can go into your plugin’s main file, outside the main function: // create a scheduled event (if it does not exist already) function cronstarter_activation() { if( !wp_next_scheduled( … Read more
wp_mail links are dead
Welcome email specific to user role
Change Password URL missing In forgot Password mail
plugins_loaded is going to load this form much too early, even if you weren’t getting errors. The form is loading before the opening <html tags. You need to select better hooks for this– admin_notices maybe, but it is hard to tell exactly what you want. Second, you need to separate your handler: function process_wpse_194468() { … Read more
Sending SMTP mail using a server with self-signed SSL
You can write your own wp_mail function that will override the core one and in your own function you can enqueque emails, and then dequeue them and send them with wp-crom events. Managing the queue is not trivial but should be doable. But the easier path is to use an external service that has an … Read more