PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 2.3.1
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v2.3.1
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / includes / admin / email_notifications / get_en_ticket_notifications.php

get_en_ticket_notifications.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 2.3.1, at includes/admin/email_notifications/get_en_ticket_notifications.php

51 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user, $wpscfunction;
7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {
8 exit;
9 }
10
11 $notification_types = $wpscfunction->get_email_notification_types();
12
13 $email_templates = get_terms([
14 'taxonomy' => 'wpsc_en',
15 'hide_empty' => false,
16 'orderby' => 'ID',
17 'order' => 'ASC',
18 ]);
19
20 ?>
21 <h4>
22 <?php _e('Ticket Notifications','supportcandy');?>
23 <button style="margin-left:10px;" class="btn btn-success btn-sm" onclick="wpsc_get_add_ticket_notification();"><?php _e('+Add New','supportcandy');?></button>
24 </h4>
25
26 <div class="wpsc_padding_space"></div>
27
28 <table class="table table-striped table-hover">
29 <tr>
30 <th><?php _e('Title','supportcandy')?></th>
31 <th><?php _e('Notification Type','supportcandy')?></th>
32 <th><?php _e('Actions','supportcandy')?></th>
33 </tr>
34 <?php foreach ( $email_templates as $email_template ) :
35 $title = $email_template->name;
36 $type = get_term_meta( $email_template->term_id, 'type', true);
37 $type = isset($notification_types[$type]) ? $notification_types[$type] : '';
38 ?>
39 <tr>
40 <td><?php echo esc_attr($title)?></td>
41 <td><?php echo esc_attr($type)?></td>
42 <td>
43 <div class="wpsc_flex">
44 <div onclick="wpsc_get_edit_ticket_notification(<?php echo esc_attr($email_template->term_id);?>);" style="cursor:pointer;"><i class="fas fa-edit"></i></div>
45 <div onclick="wpsc_clone_ticket_notification(<?php echo esc_attr($email_template->term_id);?>,'<?php echo wp_create_nonce('clone_ticket_notification')?>');" style="cursor:pointer; padding-left: 10px;"><i class="far fa-clone"></i></div>
46 <div onclick="wpsc_delete_ticket_notification(<?php echo esc_attr($email_template->term_id);?>,'<?php echo wp_create_nonce('delete_ticket_notification')?>');" style="cursor:pointer; padding-left: 10px;"><i class="fas fa-trash"></i></div>
47 </div>
48 </td>
49 </tr>
50 <?php endforeach;?>
51 </table>