# Changelog

## [1.0.1] - 2025-05-19

### Added
- Added TopSMS Analytics functionality.
- Added full Stripe integration.

### Changed
- Added website (home) url when making TopSMS request to send SMS.

## [1.0.2] - 2025-05-28

### Added
- Added publicly documented resource for your the source files in the README.txt.
- Added documentation on the use of a 3rd Party / external service (Supabase services).

### Fixed
- Replaced direct echo output with WordPress's `wp_add_inline_style()` and `wp_add_inline_script()` functions for inline styles and scripts.
- Prefixed all functions, classes, constants, namespaces, and option names with unique identifiers.

## [1.0.3] - 2025-05-29

### Added
- Documented the integration and usage of external third-party services (TopSMS API).
- Added full source code, including **uncompiled React source code**.

### Fixed
- Moved the CSS rules for hiding the WordPress admin sidebar and header from inline styles to the `topsms-admin.css` file for the setup page.

## [1.0.4] - 2025-06-02

### Added
- Added a link for the 'Request a feature' banner.

### Fixed
- Fixed timeout error when making request to TopSMS API.
- Removed unnecessary text from the Registration page.

## [1.0.5] - 2025-06-02

### Fixed
- Fixed the WooCommerce HPOS incompatibility issue.

## [1.0.6] - 2025-06-02

### Fixed
- Moved the custom CSS snippet for Setup pages (Remove the admin sidebar and header) to another custom CSS file in the `admin/css` folder to prevent overwritten when compiling source code.

## [1.0.7] - 2025-06-03

### Fixed
- Changed README.txt to readme.txt.
- Added the `Tested up to` header to the main plugin file.

## [1.0.8] - 2025-09-04

### Added
- Added a function `check_user_balance()` to check user SMS balance before sending SMS. The function is called before sending SMS when order status changed, or when the low balance alert message is sent.
- When sending an SMS, the sender name is fetched from the API. The value is saved to the options for further use.

### Changed
- Highlighted the important note in the admin settings page, under the Top Up Your Balance section. 

## [2.0.0] - 2025-10-14

### Added
- Added Bulk SMS functionality. Users can now send or schedule bulk SMS campaigns to the contacts in their selected lists.
- Added the Contacts page where users can view all WooCommerce customers and filter them by state, city, postcode, total number of orders, total amount spent, and SMS subscription status. Filters can also be saved as segments for future campaigns.
- Added the Campaigns page where users can view all sent, scheduled, cancelled, and draft campaigns, with filtering by status. Scheduled campaigns can also be cancelled via the table actions column.

### Changed
- Changed the logic to allow users to configure order status automation details even when SMS notifications for order statuses are disabled.

### Fixed
- Fixed the Topup amount in the Settings page.

## [2.0.1] - 2025-10-14

### Fixed
- Added templates content for Bulk SMS.

## [2.0.2] - 2025-10-15

### Fixed
- Added a fallback to get customer's billing phone from the `postmeta` table if no results returned by the `wc_order_addresses` table.
- Added a fallback to get customer's billing city, state and postcode from the `usermeta` table if no results returned by the `wc_customer_lookup` table.
- Fixed `topsms_campaigns` table creation on plugin update.

## [2.0.3] - 2025-10-15

### Fixed
- Fixed `topsms_campaigns` table creation on plugin update.
- Changed default subscription status to 'Unsubscribed'.

## [2.0.4] - 2025-10-15

### Fixed
- Fixed `topsms_campaigns` table creation on plugin update.

## [2.0.5] - 2025-10-15

### Fixed
- Excluded contacts without phone number when showing contacts list counts on the Bulk SMS page.
- Adjusted the status column of the contacts lists and campaigns tables.
- Fixed URL length issue for draft campaigns.

## [2.0.6] - 2025-10-15

### Fixed
- Fixed contacts list counts on the Bulk SMS page.

## [2.0.7] - 2025-10-17

### Fixed
- Included all customers in the contacts list without considering the order statuses.
- Removed unnecessary text on the Bulk SMS page.

## [2.0.8] - 2025-10-17

### Fixed
- Fixed character count for the Bulk SMS `[url]` tag.

## [2.0.9] - 2025-10-20

### Added
- Added an unsubscribe button on the contacts list table to allow users with admin capability to unsubscribe a particular user.

### Fixed
- Removed contacts with duplicate phone number when sending campaigns.
- Fixed negative total spent issue by only including those orders with status `wc-completed` and `wc-processing`.
- Fixed the contacts list table filters CSS.
- Fixed the `topsms_handle_unsubscribe` function to handle guest users and ensure it's compatible with HPOS.

## [2.0.10] - 2025-10-22

### Fixed
- Fixed the `WordPress database error Illegal mix of collations (utf8mb4_bin,NONE) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation '='` issue for subscribed status filter on the Contacts page.

## [2.0.11] - 2025-10-23

### Fixed
- Change `All Contacts` to `All Subscribed Contacts` in the list options for better understanding.

## [2.0.12] - 2025-10-24

### Fixed
- Fixed the `collation mismatch error` issue in the WordPress database.

## [2.0.13] - 2025-10-27

### Added
- Added checkboxes and additional information on the onboarding steps for compliance. 

### Fixed
- Fixed displayed datetime in the campaigns table to be in local timezone.

## [2.0.14] - 2025-10-29

### Changed
- Adjusted topup prices.

## [2.0.15] - 2025-10-30

### Changed
- Add infomative text on the Bulk SMS page.

## [2.0.16] - 2025-10-30

### Changed
- Changed welcome message on onboarding.

## [2.0.17] - 2025-10-31

### Fixed
- Fixed the notice shown on the My Account SMS Notifications page.

## [2.0.18] - 2025-11-18

### Added
- Added a new page on plugin onboarding for permalinks settings instructions.

### Changed
- Modified title and description of statuses settings in Automations page.
- Changed font style of the important note in the Settings page.
