<?php



if (! defined('ABSPATH')) {



    exit; // Exit if accessed directly.



}



// Load email template class

if (! class_exists('SensFRX_email_template')) {

    require_once plugin_dir_path(__FILE__) . 'email-templates/class-sensfrx-email-template.php';

}



class SensFRX_Webhook_Action

{

    // Webhook Action

    public function webhookAction()

    {

		if (!get_transient('sensfrxWebhookActionTaken')) {

			return;

		}

		delete_transient('sensfrxWebhookActionTaken');

		$message = 'Your account is blocked due to suspicious activities.';

		$login_url = site_url( 'wp-login.php?action=as_ch_dn&as_msg=' . urlencode($message), 'login' );

        wp_safe_redirect(

           	$login_url

        );

        exit;

    }

}

