Skip to content

Commit

Permalink
updating bugfix for workable and new features for domain and hubspot …
Browse files Browse the repository at this point in the history
…phone
  • Loading branch information
iruzevic committed Apr 24, 2023
1 parent 4c2f764 commit 781abf5
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

## [2.3.6]

## Fixed
### Added
- Workable, domain data from source and medium.
- Hubspot phonenumber field.

### Fixed
- Trash url bug fix.

## [2.3.6]

### Fixed
- Workable, custom body and heading max length field
- Workable fallback email removed text base encoded file.

## [2.3.5]

## Fixed
### Fixed
- ability for Hubspot select field to show placeholder.

## [2.3.4]

## Changed
### Changed
- updated FE Libs to v8.
- updated other packages.

## Fixed
### Fixed
- fixed some Gutenberg button component prop changes.

## Note
### Note
- Form picker has an auxiliary attribute now to store the full data (label & value) of the selected form - the current param is ID only. To keep everything functioning, the existing ID is used if the new attribute is not set, however that will lead to the form label being blank. This is expected, and the form will still work fine. You can re-select the form to fix this.
- Feel free to ignore PHPCS/Stan for now, it'll be solved in the next release.

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.3.6
* Version: 2.3.7
* Text Domain: eightshift-forms
*
* @package EightshiftForms
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static function getFormEditPageUrl(string $formId): string
*/
public static function getFormTrashActionUrl(string $formId, bool $permanent = false): string
{
return \get_delete_post_link((int) $formId, '', $permanent);
return \get_delete_post_link((int) $formId, '', $permanent) ?? '';
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Integrations/Hubspot/Hubspot.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ private function getFields(array $data, string $formId, bool $ssr): array
$output[] = $item;
break;
case 'number':
case 'phonenumber':
$item = [
'component' => 'input',
'inputFieldHidden' => $hidden,
Expand Down
14 changes: 14 additions & 0 deletions src/Integrations/Workable/WorkableClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,20 @@ private function prepareParams(array $params): array
}
}

if ($key === 'es-form-storage') {
$domain = '';
if (isset($param['value']['utm_source'])) {
$domain .= \ucfirst($param['value']['utm_source']);
}
if (isset($param['value']['utm_medium'])) {
$domain .= '(' . \ucfirst($param['value']['utm_medium']) . ')';
}

if ($domain) {
$output['domain'] = $domain;
}
}

// Remove unecesery fields.
if (isset($customFields[$key])) {
continue;
Expand Down

0 comments on commit 781abf5

Please sign in to comment.