1,
'receiver_type' => 'applicant',
'has_notification_status' => 1,
'should_email_sent_to_all' => 1,
'message' => 'Dear [applicant_name],
You have successfully [job_title] scheduled appointment',
'subject' => 'Application Successfully Submit',
'updated_by' => get_current_user_id(),
'updated_at' => current_datetime()->format( 'Y-m-d H:i:s' ),
],
[
'type_id' => 1,
'receiver_type' => 'admin',
'has_notification_status' => 1,
'should_email_sent_to_all' => 1,
'message' => 'Dear [notification_name],
You have successfully scheduled appointment',
'subject' => 'Admin Approved',
'updated_by' => get_current_user_id(),
'updated_at' => current_datetime()->format( 'Y-m-d H:i:s' ),
],
[
'type_id' => 2,
'receiver_type' => 'applicant',
'has_notification_status' => 1,
'should_email_sent_to_all' => 1,
'message' => 'Dear [applicant_name] ,
You have successfully scheduled appointment.
… ',
'subject' => 'Appointment Approved',
'updated_by' => get_current_user_id(),
'updated_at' => current_datetime()->format( 'Y-m-d H:i:s' ),
],
[
'type_id' => 2,
'receiver_type' => 'admin',
'has_notification_status' => 1,
'should_email_sent_to_all' => 1,
'message' => 'Dear [applicant_name]
You have successfully scheduled appointment.
… ',
'subject' => 'Admin Approved',
'updated_by' => get_current_user_id(),
'updated_at' => current_datetime()->format( 'Y-m-d H:i:s' ),
]
];
// Create each of the jobs.
$table_jobs = $wpdb->prefix . 'axil_job_listing_email_templates';
foreach ( $jobs as $job ) {
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery -- Direct query is acceptable in seeder files that only run during plugin setup/installation.
$wpdb->insert(
$table_jobs,
$job
);
}
// Update that seeder already runs.
update_option( Keys::EMAIL_TEMPLATE_SEEDER_RAN, true );
}
}