2 updated answer as per requirement
source | link

By default, there is no field for saving the name (first name and last name) in the newsletter_subscriber table.

If you want to save these values, first you need to create a custom module and add the fields to hold first name and last name in the table.

Next, to save these values, you can either override Magento\Newsletter\Model\Subscriber or write a plugin for that.

I hope you know how to create a plugin.

Below is the sample code for the plugin:

<?php
namespace Stack\Newsletters\Plugin;

use Magento\Framework\App\Request\Http;

class Subscriber {
    protected $request;
    public function __construct(Http $request){
        $this->request = $request;
    }

    public function aroundSubscribe($subject, \Closure $proceed, $email) {

        if ($this->request->isPost() && $this->request->getPost('firstname''fname')) { 

            $firstname$fname = $this->request->getPost('firstname''fname');
            $lastname$lname = $this->request->getPost('lastname''lname');

            $subject->setFirstname>setFname($firstname$fname);
            $subject->setLastname>setLname($lastname$lname);
            $result = $proceed($email);

            try {
                $subject->save();
            }catch (\Exception $e) {
                throw new \Exception($e->getMessage());
            }
        }
        return $result;
    }
}

I hope it can help you.

By default, there is no field for saving the name (first name and last name) in the newsletter_subscriber table.

If you want to save these values, first you need to create a custom module and add the fields to hold first name and last name in the table.

Next, to save these values, you can either override Magento\Newsletter\Model\Subscriber or write a plugin for that.

I hope you know how to create a plugin.

Below is the sample code for the plugin:

<?php
namespace Stack\Newsletters\Plugin;

use Magento\Framework\App\Request\Http;

class Subscriber {
    protected $request;
    public function __construct(Http $request){
        $this->request = $request;
    }

    public function aroundSubscribe($subject, \Closure $proceed, $email) {

        if ($this->request->isPost() && $this->request->getPost('firstname')) { 

            $firstname = $this->request->getPost('firstname');
            $lastname = $this->request->getPost('lastname');

            $subject->setFirstname($firstname);
            $subject->setLastname($lastname);
            $result = $proceed($email);

            try {
                $subject->save();
            }catch (\Exception $e) {
                throw new \Exception($e->getMessage());
            }
        }
        return $result;
    }
}

I hope it can help you.

By default, there is no field for saving the name (first name and last name) in the newsletter_subscriber table.

If you want to save these values, first you need to create a custom module and add the fields to hold first name and last name in the table.

Next, to save these values, you can either override Magento\Newsletter\Model\Subscriber or write a plugin for that.

I hope you know how to create a plugin.

Below is the sample code for the plugin:

<?php
namespace Stack\Newsletters\Plugin;

use Magento\Framework\App\Request\Http;

class Subscriber {
    protected $request;
    public function __construct(Http $request){
        $this->request = $request;
    }

    public function aroundSubscribe($subject, \Closure $proceed, $email) {

        if ($this->request->isPost() && $this->request->getPost('fname')) { 

            $fname = $this->request->getPost('fname');
            $lname = $this->request->getPost('lname');

            $subject->setFname($fname);
            $subject->setLname($lname);
            $result = $proceed($email);

            try {
                $subject->save();
            }catch (\Exception $e) {
                throw new \Exception($e->getMessage());
            }
        }
        return $result;
    }
}

I hope it can help you.

1
source | link

By default, there is no field for saving the name (first name and last name) in the newsletter_subscriber table.

If you want to save these values, first you need to create a custom module and add the fields to hold first name and last name in the table.

Next, to save these values, you can either override Magento\Newsletter\Model\Subscriber or write a plugin for that.

I hope you know how to create a plugin.

Below is the sample code for the plugin:

<?php
namespace Stack\Newsletters\Plugin;

use Magento\Framework\App\Request\Http;

class Subscriber {
    protected $request;
    public function __construct(Http $request){
        $this->request = $request;
    }

    public function aroundSubscribe($subject, \Closure $proceed, $email) {

        if ($this->request->isPost() && $this->request->getPost('firstname')) { 

            $firstname = $this->request->getPost('firstname');
            $lastname = $this->request->getPost('lastname');

            $subject->setFirstname($firstname);
            $subject->setLastname($lastname);
            $result = $proceed($email);

            try {
                $subject->save();
            }catch (\Exception $e) {
                throw new \Exception($e->getMessage());
            }
        }
        return $result;
    }
}

I hope it can help you.