# notifier/2.4.2/includes/classes/class-notifier-frontend.php

WANotifier for Forms and Actions, version 2.4.2. 33 lines.

- Page: https://pluginprobe.com/plugins/notifier/2.4.2/code/includes/classes/class-notifier-frontend.php
- Raw: https://pluginprobe.com/plugins/notifier/2.4.2/raw/includes/classes/class-notifier-frontend.php
- Modified: 2023-06-13T14:37:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/notifier/2.4.2/code/includes/classes/class-notifier-frontend.php#L10-L20`.

```php
<?php
/**
 *
 * @package    Wa_Notifier
 */
class Notifier_Frontend {
	/**
	 * Init
	 */
	public static function init() {
        add_action( 'wp_footer', array( __CLASS__ , 'display_whatsapp_chat_button' ) );
	}

	/**
	 * Display Whatsapp chat button.
	 */
	public static function display_whatsapp_chat_button() {
		$enable_click_chat = get_option('notifier_ctc_enable');
		$btn_style = get_option('notifier_ctc_button_style');
		$click_chat_number = get_option('notifier_ctc_whatsapp_number');

		if(!$btn_style){
			return;
		}

		if($enable_click_chat === 'yes' &&  !empty($click_chat_number)){
			if($btn_style !== 'default'){
				include_once NOTIFIER_PATH . 'templates/buttons/'.$btn_style.'.php';
			}
		}
	}
}

```
