src/Ajax.php
public function hook()
    {
        wp_enqueue_script('jquery');

        add_action('wp_head', array($this, 'printToken'));
        add_action('admin_head', array($this, 'printToken'));

        add_action('wp_footer', array($this, 'printAjaxHeader'));
        add_action('admin_footer', array($this, 'printAjaxHeader'));
    }
public function hook()
    {
        wp_enqueue_script('jquery');

        add_action('wp_head', array($this, 'printToken'));
        add_action('admin_head', array($this, 'printToken'));

        add_action('wp_footer', array($this, 'printAjaxHeader'));
        add_action('admin_footer', array($this, 'printAjaxHeader'));
    }
public function hook ( ) { wp_enqueue_script ( 'jquery' ) ; add_action ( 'wp_head' , array ( $ this , 'printToken' ) ) ; add_action ( 'admin_head' , array ( $ this , 'printToken' ) ) ; add_action ( 'wp_footer' , array ( $ this , 'printAjaxHeader' ) ) ; add_action ( 'admin_footer' , array ( $ this , 'printAjaxHeader' ) ) ; }
Hook required script to WordPress.
Hook required script to WordPress .