Add missing brackets to custom field shortcodes [MAILPOET-1013]

This commit is contained in:
stoletniy
2017-07-21 14:40:56 +03:00
parent 4062e0662d
commit 0cebcd3965
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ class ShortcodesHelper {
return array_map(function ($custom_field) {
return array(
'text' => $custom_field->name,
'shortcode' => 'subscriber:cf_' . $custom_field->id
'shortcode' => '[subscriber:cf_' . $custom_field->id . ']'
);
}, $custom_fields);
}

View File

@ -29,7 +29,7 @@ class ShortcodesHelperTest extends MailPoetTest {
$custom_subscriber_shortcode = end($shortcodes['Subscriber']);
expect($custom_subscriber_shortcode['text'])->equals($custom_field->name);
expect($custom_subscriber_shortcode['shortcode'])
->equals('subscriber:cf_' . $custom_field->id);
->equals('[subscriber:cf_' . $custom_field->id . ']');
}
function _after() {