Skip to content

Commit de03021

Browse files
committed
fixing issue with output original params
1 parent c4d6b9e commit de03021

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

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

7+
## [3.0.16]
8+
9+
### Fixed
10+
11+
- `FD_PARAMS_ORIGINAL` output value.
12+
713
## [3.0.15]
814

915
### Changed
@@ -302,6 +308,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
302308

303309
- Initial production release.
304310

311+
[3.0.16]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.15...3.0.16
305312
[3.0.15]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.14...3.0.15
306313
[3.0.14]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.13...3.0.14
307314
[3.0.13]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.12...3.0.13

src/Rest/Routes/AbstractUtilsBaseRoute.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ protected function getFormDetailsApi($request): array
510510
$output[UtilsConfig::FD_STORAGE] = \json_decode($params['storage'] ?? '', true) ?? [];
511511

512512
// Set debug original params.
513-
$output[UtilsConfig::FD_PARAMS_ORIGINAL] = sanitize_text_field($request);
513+
$output[UtilsConfig::FD_PARAMS_ORIGINAL] = $this->getParamsOriginal($request);
514514

515515
return $output;
516516
}
@@ -542,4 +542,16 @@ private function getFormDetailsApiDirectImport(array $params): array
542542

543543
return $output;
544544
}
545+
546+
/**
547+
* Get params original.
548+
*
549+
* @param mixed $request Data got from endpoint url.
550+
*
551+
* @return string
552+
*/
553+
private function getParamsOriginal($request): string
554+
{
555+
return \sanitize_text_field(\wp_json_encode($this->getRequestParams($request)));
556+
}
545557
}

0 commit comments

Comments
 (0)