Skip to content

Commit

Permalink
Merge pull request #477 from infinum/feature/response-tags
Browse files Browse the repository at this point in the history
Release 5.6.6
  • Loading branch information
iruzevic authored Jan 8, 2025
2 parents 5b84a30 + b15f2be commit 306635f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ 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/).

## [5.6.6]

### Added

- 2 new response tags for mailer `mailerTimestamp` and `mailerTimestampHuman`.
- ability for subject to process response tags.

### Changes

- Moments API will not fetch only 100 items per request.

## [5.6.5]

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

- Initial production release.

[5.6.6]: https://github.com/infinum/eightshift-forms/compare/5.6.5...5.6.6
[5.6.5]: https://github.com/infinum/eightshift-forms/compare/5.6.4...5.6.5
[5.6.4]: https://github.com/infinum/eightshift-forms/compare/5.6.3...5.6.4
[5.6.3]: https://github.com/infinum/eightshift-forms/compare/5.6.2...5.6.3
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 Forms is a complete form builder plugin that utilizes modern Block editor features with multiple third-party integrations, bringing your project to a new level.
* Author: WordPress team @Infinum
* Author URI: https://eightshift.com/
* Version: 5.6.5
* Version: 5.6.6
* Text Domain: eightshift-forms
*
* @package EightshiftForms
Expand Down
2 changes: 2 additions & 0 deletions src/Hooks/FiltersSettingsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ public function getSettingsFiltersData(): array
'mailerPostId' => '',
'mailerFormId' => '',
'mailerFormTitle' => '',
'mailerTimestamp' => '',
'mailerTimestampHuman' => '',
],
'labels' => [
'title' => \__('Mailer', 'eightshift-forms'),
Expand Down
2 changes: 1 addition & 1 deletion src/Integrations/Mailer/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function sendFormEmail(
// Send email.
return \wp_mail(
$this->getTemplate('to', $fields, $formId, $to),
$this->getTemplate('subject', $fields, $formId, $subject),
$this->getTemplate('subject', $fields, $formId, $subject, $responseFields),
$this->getTemplate('message', $fields, $formId, $template, $responseFields),
$this->getHeader(
UtilsSettingsHelper::getSettingValue(SettingsMailer::SETTINGS_MAILER_SENDER_EMAIL_KEY, $formId),
Expand Down
6 changes: 6 additions & 0 deletions src/Rest/Routes/AbstractFormSubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ protected function getCommonEmailResponseTags(array $data, array $formDetails):
case 'mailerFormTitle':
$output[$key] = \get_the_title((int) $data[UtilsHelper::getStateResponseOutputKey('formId')]);
break;
case 'mailerTimestamp':
$output[$key] = \current_datetime()->format('YmdHis');
break;
case 'mailerTimestampHuman':
$output[$key] = \current_datetime()->format('Y-m-d H:i:s');
break;
case 'mailerEntryUrl':
$entryId = $data[UtilsHelper::getStateResponseOutputKey('entry')] ?? '';
$formId = $data[UtilsHelper::getStateResponseOutputKey('formId')] ?? '';
Expand Down

0 comments on commit 306635f

Please sign in to comment.