Adds IP address field to export
This commit is contained in:
@ -181,6 +181,7 @@ class Export {
|
|||||||
'first_name',
|
'first_name',
|
||||||
'last_name',
|
'last_name',
|
||||||
'email',
|
'email',
|
||||||
|
'subscribed_ip',
|
||||||
array(
|
array(
|
||||||
'global_status' => Subscriber::$_table . '.status'
|
'global_status' => Subscriber::$_table . '.status'
|
||||||
),
|
),
|
||||||
|
@ -33,12 +33,13 @@ class ImportExportFactory {
|
|||||||
'first_name' => __('First name', 'mailpoet'),
|
'first_name' => __('First name', 'mailpoet'),
|
||||||
'last_name' => __('Last name', 'mailpoet')
|
'last_name' => __('Last name', 'mailpoet')
|
||||||
);
|
);
|
||||||
if ($this->action === 'export') {
|
if($this->action === 'export') {
|
||||||
$fields = array_merge(
|
$fields = array_merge(
|
||||||
$fields,
|
$fields,
|
||||||
array(
|
array(
|
||||||
'list_status' => _x('List status', 'Subscription status', 'mailpoet'),
|
'list_status' => _x('List status', 'Subscription status', 'mailpoet'),
|
||||||
'global_status' => _x('Global status', 'Subscription status', 'mailpoet')
|
'global_status' => _x('Global status', 'Subscription status', 'mailpoet'),
|
||||||
|
'subscribed_ip' => __('IP address', 'mailpoet')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,8 @@ class ImportExportFactoryTest extends \MailPoetTest {
|
|||||||
'first_name',
|
'first_name',
|
||||||
'last_name',
|
'last_name',
|
||||||
'list_status',
|
'list_status',
|
||||||
'global_status'
|
'global_status',
|
||||||
|
'subscribed_ip'
|
||||||
);
|
);
|
||||||
foreach($export_fields as $field) {
|
foreach($export_fields as $field) {
|
||||||
expect(in_array($field, array_keys($subsriberFields)))->true();
|
expect(in_array($field, array_keys($subsriberFields)))->true();
|
||||||
|
Reference in New Issue
Block a user