• Resolved DesignLoud

    (@designloud)


    I am following this tutorial for how to send an email when a job is published – I however am trying to do the opposite, I would like an email to go out to the job author when the job is about to expire/has expired.

    I can navigate and write the code but I am having trouble finding the appropriate action hook. Would this be delete_job_listing since you use publish_job_listing in the tutorial?

    Example from tutorial

    function listing_published_send_email($post_id) {
       $post = get_post($post_id);
       $author = get_userdata($post->post_author);
    
       $message = "
          Hi ".$author->display_name.",
          Your listing, ".$post->post_title." has just been approved at ".get_permalink( $post_id ).". Well done!
       ";
       wp_mail($author->user_email, "Your job listing is online", $message);
    }
    add_action('publish_job_listing', 'listing_published_send_email');

    Tutorial: https://wpjobmanager.com/document/tutorial-send-email-employer-job-listing-approved/

    https://www.ads-software.com/plugins/wp-job-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Send to company email when/before job expires’ is closed to new replies.