# Changelog for Square Thumbnails 2.4.0

## New Features

### Mailchimp Newsletter Integration

- Added complete Mailchimp integration for newsletter functionality
- Created a newsletter subscription form with widget and shortcode support
- Added domain tracking for better subscriber management
- Included automatic merge field creation in Mailchimp lists
- Added admin interface for Mailchimp setup and configuration

### Newsletter Widget and Shortcode

- Added a widget for easy placement of newsletter subscription forms
- Created a shortcode `[square_thumbnails_newsletter]` with customizable parameters
- Implemented AJAX form submission for a better user experience
- Added success/error notifications for subscription attempts

### Backend Improvements

- Created a dedicated admin page for Mailchimp configuration
- Added testing tools for Mailchimp API connectivity
- Implemented comprehensive error logging and debugging
- Created a setup wizard for required Mailchimp merge fields

## Bug Fixes

- Fixed syntax error in Mailchimp class where a closing brace was missing
- Improved error handling in Mailchimp API communication
- Enhanced domain tracking for better subscriber identification

## Documentation

- Added comprehensive documentation for Mailchimp integration
- Updated readme.txt with information about the new features
- Added tooltips and help text throughout the admin interface

## Technical Changes

- Added multiple new classes:
  - `Square_Thumbnails_Newsletter` for form rendering and processing
  - `Square_Thumbnails_Newsletter_Widget` for WordPress widget integration
  - `Square_Thumbnails_Mailchimp_Setup` for Mailchimp field configuration
  - `Square_Thumbnails_Mailchimp_Admin` for admin interface
- Enhanced the existing `Square_Thumbnails_Mailchimp` class with better error handling
- Added proper AJAX security with nonce verification
- Implemented progressive enhancement for non-JavaScript users
