Skip to content

Commit

Permalink
fixing issue with the hidden field and legacy items in the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Nov 11, 2022
1 parent 7ccebfe commit 0e408c3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [2.1.0]

### Fixed
- Issue with the hidden field and legacy items in the integration settings.

### Changed
- MailerLite default status to active

## [2.0.1]

### Fixed
Expand Down Expand Up @@ -142,6 +150,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

- Initial production release.

[2.1.0]: https://github.com/infinum/eightshift-forms/compare/2.0.1...2.1.0
[2.0.1]: https://github.com/infinum/eightshift-forms/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/infinum/eightshift-forms/compare/1.4.0...2.0.0
[1.4.0]: https://github.com/infinum/eightshift-forms/compare/1.3.0...1.4.0
Expand Down
2 changes: 1 addition & 1 deletion eightshift-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Description: Eightshift form builder plugin.
* Author: Team Eightshift
* Author URI: https://eightshift.com/
* Version: 2.0.0
* Version: 2.1.0
* Text Domain: eightshift-forms
*
* @package EightshiftForms
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eightshift/eightshift-forms",
"version": "2.0.1",
"version": "2.1.0",
"description": "This repository contains all the tools you need to start building a modern WordPress project.",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/Integrations/Mailerlite/MailerliteClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function postApplication(string $itemId, array $params, array $files, str
'email' => $email,
'resubscribe' => true,
'autoresponders' => true,
'type' => 'unconfirmed',
'type' => 'active',
'fields' => $this->prepareParams($params),
];

Expand Down
7 changes: 6 additions & 1 deletion src/Settings/SettingsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ public function getIntegrationFieldsValue(array $dbSettingsValue, array $formFie
// Find field id.
$id = $value["{$component}Id"] ?? '';

// Find field type.
$fieldType = $value["{$component}Type"] ?? '';

// Find field label.
$label = $value["{$component}FieldLabel"] ?? '';

Expand Down Expand Up @@ -538,7 +541,9 @@ static function ($item) use ($itemValue) {
$formFields[$key]["{$component}FieldOrder"] = $itemValue;
break;
case $this->integrationFieldUse:
$formFields[$key]["{$component}FieldUse"] = \filter_var($itemValue, \FILTER_VALIDATE_BOOLEAN);
if ($fieldType !== 'hidden') {
$formFields[$key]["{$component}FieldUse"] = \filter_var($itemValue, \FILTER_VALIDATE_BOOLEAN);
}
break;
case $this->integrationFieldFileInfoLabel:
if ($itemValue === 'true') {
Expand Down

0 comments on commit 0e408c3

Please sign in to comment.