*/ class MEC_feature_notifications extends MEC_base { public $factory; public $main; public $settings; public $notif_settings; /** * Constructor method * @author Webnus */ public function __construct() { // Import MEC Factory $this->factory = $this->getFactory(); // Import MEC Main $this->main = $this->getMain(); // MEC Settings $this->settings = $this->main->get_settings(); // MEC Notification Settings $this->notif_settings = $this->main->get_notifications(); } /** * Initialize notifications feature * @author Webnus */ public function init() { // Module is disabled if(!isset($this->settings['notif_per_event']) || !$this->settings['notif_per_event']) return; $this->factory->action('mec_metabox_details', [$this, 'meta_box_notifications'], 30); } /** * Show notification meta box * @author Webnus * @param $post */ public function meta_box_notifications($post) { $values = get_post_meta($post->ID, 'mec_notifications', true); if(!is_array($values)) $values = []; $notifications = $this->get_notifications(); ?>
$notification): if(isset($this->notif_settings[$key]) and isset($this->notif_settings[$key]['status']) and !$this->notif_settings[$key]['status']) continue; ?>

notif_settings[$key]) and isset($this->notif_settings[$key]['content']) and trim($this->notif_settings[$key]['content'])) ? stripslashes($this->notif_settings[$key]['content']) : '')), 'mec_notifications_'.esc_attr($key).'_content', array('textarea_name'=>'mec[notifications]['.$key.'][content]')); ?>

display_placeholders(); ?>
[ 'label' => esc_html__('Booking Notification', 'modern-events-calendar-lite') ], 'booking_confirmation' => [ 'label' => esc_html__('Booking Confirmation', 'modern-events-calendar-lite') ], 'booking_rejection' => [ 'label' => esc_html__('Booking Rejection', 'modern-events-calendar-lite') ], 'email_verification' => [ 'label' => esc_html__('Email Verification', 'modern-events-calendar-lite') ], 'cancellation_notification' => [ 'label' => esc_html__('Booking Cancellation', 'modern-events-calendar-lite') ], 'booking_reminder' => [ 'label' => esc_html__('Booking Reminder', 'modern-events-calendar-lite') ], 'event_finished' => [ 'label' => esc_html__('Event Finished', 'modern-events-calendar-lite') ], 'event_soldout' => [ 'label' => esc_html__('Event Soldout', 'modern-events-calendar-lite') ], 'admin_notification' => [ 'label' => esc_html__('Admin Notification', 'modern-events-calendar-lite') ], 'certificate_send' => [ 'label' => esc_html__('Send Certificate', 'modern-events-calendar-lite') ], ]; return apply_filters('mec_event_notifications', $notifications); } public static function display_placeholders() { ?>
  • %%name%%:
  • %%first_name%%:
  • %%last_name%%:
  • %%user_email%%:
  • %%book_date%%:
  • %%book_time%%:
  • %%book_datetime%%:
  • %%book_other_datetimes%%:
  • %%book_date_next_occurrences%%:
  • %%book_datetime_next_occurrences%%:
  • %%book_price%%:
  • %%book_payable%%:
  • %%attendee_price%%:
  • %%book_order_time%%:
  • %%blog_name%%:
  • %%blog_url%%:
  • %%blog_description%%:
  • %%event_title%%:
  • %%event_description%%:
  • %%event_tags%%:
  • %%event_labels%%:
  • %%event_categories%%:
  • %%event_cost%%:
  • %%event_link%%:
  • %%event_speaker_name%%:
  • %%event_organizer_name%%:
  • %%event_organizer_tel%%:
  • %%event_organizer_email%%:
  • %%event_organizer_url%%:
  • %%event_other_organizers_name%%:
  • %%event_other_organizers_tel%%:
  • %%event_other_organizers_email%%:
  • %%event_location_name%%:
  • %%event_location_address%%:
  • %%event_other_locations_name%%:
  • %%event_other_locations_address%%:
  • %%event_featured_image%%:
  • %%event_more_info%%:
  • %%event_other_info%%:
  • %%online_link%%:
  • %%attendees_full_info%%:
  • %%all_bfixed_fields%%:
  • %%booking_id%%:
  • %%booking_transaction_id%%:
  • %%admin_link%%:
  • %%total_attendees%%:
  • %%amount_tickets%%:
  • %%ticket_name%%:
  • %%ticket_time%%:
  • %%ticket_name_time%%:
  • %%ticket_private_description%%:
  • %%ticket_variations%%:
  • %%payment_gateway%%:
  • %%dl_file%%:
  • %%google_calendar_link%%:
  • %%google_calendar_link_next_occurrences%%:
  • %%event_start_date%%:
  • %%event_end_date%%:
  • %%event_start_time%%:
  • %%event_end_time%%:
  • %%event_timezone%%:
  • %%event_start_date_local%%:
  • %%event_end_date_local%%:
  • %%event_start_time_local%%:
  • %%event_end_time_local%%:
  • %%event_status%%:
  • %%event_note%%: