Skip to content

Commit d60a128

Browse files
committed
Changed members export to contain tiers
refs https://github.com/TryGhost/Team/issues/1076 - The "products" is a legacy term for what is now "tiers" since multiple tiers feature introduction in https://github.com/TryGhost/Ghost/releases/tag/v4.39.0 - Note, the "tiers" is a field meant for informational purposes and cannot be imported back into Ghost site.
1 parent 48daae9 commit d60a128

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/members-csv/lib/unparse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const DEFAULT_COLUMNS = [
1111
'created_at',
1212
'deleted_at',
1313
'labels',
14-
'products'
14+
'tiers'
1515
];
1616

1717
const unparse = (members, columns = DEFAULT_COLUMNS.slice()) => {
@@ -54,7 +54,7 @@ const unparse = (members, columns = DEFAULT_COLUMNS.slice()) => {
5454
created_at: member.created_at,
5555
deleted_at: member.deleted_at,
5656
labels: labels,
57-
products: tiers,
57+
tiers: tiers,
5858
error: member.error || null
5959
};
6060
});

packages/members-csv/test/unparse.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('unparse', function () {
1313

1414
assert.ok(result);
1515

16-
const expected = `id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at,labels,products\r\n,[email protected],Sam Memberino,Early supporter,,,,,,,`;
16+
const expected = `id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at,labels,tiers\r\n,[email protected],Sam Memberino,Early supporter,,,,,,,`;
1717
assert.equal(result, expected);
1818
});
1919

@@ -96,11 +96,11 @@ [email protected],"banana, avocado"`;
9696
}];
9797

9898
const columns = [
99-
'email', 'products'
99+
'email', 'tiers'
100100
];
101101

102102
const result = unparse(json, columns);
103-
const expected = `email,products\r\[email protected],Bronze Level`;
103+
const expected = `email,tiers\r\[email protected],Bronze Level`;
104104
assert.equal(result, expected);
105105
});
106106
});

0 commit comments

Comments
 (0)