How to get the Application or Job details when I submit a new Job Application in Job Manager plugin for WordPress

I have something like, after a new job application, I try to get the category of the Job I applied to, and put a check of the job category, so I can send an email. This is my code attempt: add_action( 'new_job_application', function( $application_id, $job_id ) { $category_detail=get_the_category($job_id); // $post->ID foreach($category_detail as $cd){ //echo $cd->cat_name; if($cd->cat_name == 'INTERNAL EMPLOYMENT'){ $message = "Well done!"; $message .= "INTERNAL EMPLOYMENT"; wp_mail('gaderex376@barakal.com', "Testing Email test INTERNAL EMPLOYMENT", $message); } } }, 999, 2 ); But if I use var_dump($category_detail); I get an empty array. Did I miss something?

Comment (0)

You’ll be in good company