@@ -708,10 +708,13 @@ public static function get_expired_notification_content() {
708
708
* @return array
709
709
*/
710
710
public static function get_notification_options ( $ type ) {
711
- $ options = array ();
712
- $ admin_email = get_option ( 'admin_email ' );
713
- $ hr_email = get_option ( 'awsm_hr_email_address ' );
714
- $ expired_options = self ::get_expired_notification_content ();
711
+ $ options = array ();
712
+ $ admin_email = get_option ( 'admin_email ' );
713
+ $ hr_email = get_option ( 'awsm_hr_email_address ' );
714
+ $ expired_options = self ::get_expired_notification_content ();
715
+ if ( ! class_exists ( 'AWSM_Job_Openings_Settings ' ) ) {
716
+ require_once AWSM_JOBS_PLUGIN_DIR . '/admin/class-awsm-job-openings-settings.php ' ;
717
+ }
715
718
$ default_from_email = AWSM_Job_Openings_Settings::awsm_from_email ();
716
719
717
720
if ( $ type === 'applicant ' ) {
@@ -789,13 +792,16 @@ protected function notification_email( $applicant_details, $data = array() ) {
789
792
}
790
793
791
794
if ( $ enable ) {
792
- $ admin_email = get_option ( 'admin_email ' );
793
- $ hr_mail = get_option ( 'awsm_hr_email_address ' );
794
- $ applicant_email = $ applicant_details ['awsm_applicant_email ' ];
795
- $ company_name = get_option ( 'awsm_job_company_name ' );
796
- $ from = ( ! empty ( $ company_name ) ) ? $ company_name : get_option ( 'blogname ' );
797
- $ author_id = get_post_field ( 'post_author ' , $ applicant_details ['awsm_job_id ' ] );
798
- $ author_email = get_the_author_meta ( 'user_email ' , intval ( $ author_id ) );
795
+ $ admin_email = get_option ( 'admin_email ' );
796
+ $ hr_mail = get_option ( 'awsm_hr_email_address ' );
797
+ $ applicant_email = $ applicant_details ['awsm_applicant_email ' ];
798
+ $ company_name = get_option ( 'awsm_job_company_name ' );
799
+ $ from = ( ! empty ( $ company_name ) ) ? $ company_name : get_option ( 'blogname ' );
800
+ $ author_id = get_post_field ( 'post_author ' , $ applicant_details ['awsm_job_id ' ] );
801
+ $ author_email = get_the_author_meta ( 'user_email ' , intval ( $ author_id ) );
802
+ if ( ! class_exists ( 'AWSM_Job_Openings_Settings ' ) ) {
803
+ require_once AWSM_JOBS_PLUGIN_DIR . '/admin/class-awsm-job-openings-settings.php ' ;
804
+ }
799
805
$ default_from_email = AWSM_Job_Openings_Settings::awsm_from_email ();
800
806
801
807
$ tags = $ this ->get_mail_template_tags (
0 commit comments