# jetformbuilder/3.6.6/modules/actions-v2/mailchimp/mailchimp-tab-handler.php

JetFormBuilder — Dynamic Blocks Form Builder, version 3.6.6. 35 lines.

- Page: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/code/modules/actions-v2/mailchimp/mailchimp-tab-handler.php
- Raw: https://pluginprobe.com/plugins/jetformbuilder/3.6.6/raw/modules/actions-v2/mailchimp/mailchimp-tab-handler.php
- Modified: 2024-08-13T13:45:00+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/jetformbuilder/3.6.6/code/modules/actions-v2/mailchimp/mailchimp-tab-handler.php#L10-L20`.

```php
<?php


namespace JFB_Modules\Actions_V2\Mailchimp;

use Jet_Form_Builder\Admin\Tabs_Handlers\Base_Handler;

class Mailchimp_Tab_Handler extends Base_Handler {

	public function slug() {
		return 'mailchimp-tab';
	}

	public function on_get_request() {
		// phpcs:ignore WordPress.Security.NonceVerification.Missing
		$api_key = sanitize_text_field( wp_unslash( $_POST['api_key'] ?? '' ) );

		$result = $this->update_options(
			array(
				'api_key' => $api_key,
			)
		);

		$this->send_response( $result );
	}

	public function on_load() {
		return $this->get_options(
			array(
				'api_key' => '',
			)
		);
	}
}

```
