Skip to content

Commit

Permalink
Merge branch 'hotfix/multi-form-goal-shortcode-7060' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
angelablake committed Oct 20, 2023
2 parents 538aff4 + 4ed0ba9 commit 33cffa1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/MultiFormGoals/MultiFormGoal/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function addShortcode()
/**
* Returns Shortcode markup
*
* @since 3.0.3 Use static function on array_map callback to pass the id as reference for _give_redirect_form_id to prevent warnings on PHP 8.0.1 or plus
* @since 2.9.0
**/
public function renderCallback($attributes)
Expand All @@ -49,7 +50,12 @@ public function renderCallback($attributes)

$multiFormGoal = new MultiFormGoal(
[
'ids' => array_map('_give_redirect_form_id', $attributes['ids']),
'ids' => array_map(
static function ($id) {
_give_redirect_form_id($id);
},
$attributes['ids']
),
'tags' => $attributes['tags'],
'categories' => $attributes['categories'],
'goal' => $attributes['goal'],
Expand Down

0 comments on commit 33cffa1

Please sign in to comment.