public function interval_string($string, $email) { if ($email->interval_type == 'points_greater_than') { $meta = maybe_unserialize($email->meta); $string = sprintf(__('%d %s %s %d'), $email->interval_num, SFN_FollowUpEmails::get_duration($email->interval_duration), SFN_FollowUpEmails::get_trigger_name($email->interval_type), $meta['points_greater_than']); } return $string; }
?> </a></span> | <span class="trash"><a onclick="return confirm('Really delete this entry?');" href="admin.php?page=wc-followup-emails&tab=delete&id=<?php echo $email->id; ?> "><?php _e('Delete', 'wc_followup_emails'); ?> </a></span> </div> </td> <td> <?php if ($email->interval_duration != 'date') { printf(__('%d %s after user signs up'), $email->interval_num, SFN_FollowUpEmails::get_duration($email->interval_duration)); } else { printf(__('Send on %s'), $email->send_date); } ?> </td> <td> <?php echo $email->usage_count; ?> </td> <?php do_action('fue_table_signups_body'); ?> </tr> <?php
?> </a></span> | <span class="trash"><a onclick="return confirm('Really delete this entry?');" href="admin.php?page=wc-followup-emails&tab=delete&id=<?php echo $email->id; ?> "><?php _e('Delete', 'wc_followup_emails'); ?> </a></span> </div> </td> <td> <?php if ($email->interval_duration != 'date') { printf(__('%d %s after %s'), $email->interval_num, SFN_FollowUpEmails::get_duration($email->interval_duration), SFN_FollowUpEmails::get_trigger_name($email->interval_type)); } else { printf(__('Send on %s'), $email->send_date); } ?> </td> <td> <?php echo $email->usage_count; ?> </td> <td> <?php
public function interval_string($string, $email) { if ($email->interval_type == 'before_tribe_event_starts' || $email->interval_type == 'after_tribe_event_ends') { $string = sprintf(__('%d %s %s'), $email->interval_num, SFN_FollowUpEmails::get_duration($email->interval_duration), SFN_FollowUpEmails::get_trigger_name($email->interval_type)); } return $string; }
public function email_list_table() { global $wpdb; $emails = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}followup_emails WHERE `email_type` = 'subscription' ORDER BY `priority` ASC, `name` ASC"); ?> <div class="section" id="subscription_mails"> <h3><?php _e('Subscription Emails', 'wc_followup_emails'); ?> </h3> <table class="wp-list-table widefat fixed posts subscription-table"> <thead> <tr> <th scope="col" id="subscription_priority" class="manage-column column-type" style="width:50px;"><?php _e('Priority', 'wc_followup_emails'); ?> </th> <th scope="col" id="subscription_type" class="manage-column column-type" style=""><?php _e('Name', 'wc_followup_emails'); ?> </th> <th scope="col" id="subscription_interval" class="manage-column column-amount" style=""><?php _e('Interval', 'wc_followup_emails'); ?> </th> <th scope="col" id="subscription_usage_count" class="manage-column column-usage_count" style=""><?php _e('Used', 'wc_followup_emails'); ?> </th> <?php do_action('fue_table_customer_head'); ?> </tr> </thead> <tbody id="the_list"> <?php if (empty($emails)) { ?> <tr scope="row"> <th colspan="4"><?php _e('No emails available', 'wc_followup_emails'); ?> </th> </tr> <?php } else { $p = 0; foreach ($emails as $email) { $p++; ?> <tr scope="row"> <td style="text-align: center; vertical-align:middle;"><span class="priority"><?php echo $p; ?> </span></td> <td class="post-title column-title"> <input type="hidden" name="generic_order[]" value="<?php echo $email->id; ?> " /> <strong><a class="row-title" href="admin.php?page=wc-followup-emails&tab=edit&id=<?php echo $email->id; ?> "><?php echo stripslashes($email->name); ?> </a></strong> <div class="row-actions"> <span class="edit"><a href="admin.php?page=wc-followup-emails&tab=edit&id=<?php echo $email->id; ?> "><?php _e('Edit', 'wc_followup_emails'); ?> </a></span> | <span class="trash"><a onclick="return confirm('Really delete this entry?');" href="admin.php?page=wc-followup-emails&tab=delete&id=<?php echo $email->id; ?> "><?php _e('Delete', 'wc_followup_emails'); ?> </a></span> </div> </td> <td> <?php $interval_str = sprintf(__('%d %s %s'), $email->interval_num, SFN_FollowUpEmails::get_duration($email->interval_duration), SFN_FollowUpEmails::get_trigger_name($email->interval_type)); echo apply_filters('fue_interval_str', $interval_str, $email); ?> </td> <td> <?php echo $email->usage_count; ?> </td> <?php do_action('fue_table_customer_body'); ?> </tr> <?php } ?> <?php } ?> </tbody> </table> <div class="fue_table_footer"> <div class="order_message"></div> </div> </div> <?php }