public function isAjax(bool $flag = null): bool
    {
        if (isset($flag)) {
            $this->is_ajax = $flag;
        }
        if (!isset($this->is_ajax) && $this->is_wordpress) {
            if (defined('DOING_AJAX') && DOING_AJAX) {
                $this->is_ajax = true; // Via WP constants.
            }
        }
        return (bool) $this->is_ajax;
    }