Skip to content

Commit

Permalink
Merge pull request #19 from stape-io/fix-marketing-subscription
Browse files Browse the repository at this point in the history
Fix marketing subscriptions
  • Loading branch information
kHorozhanov authored Jul 5, 2024
2 parents c218f00 + 3f2100e commit cbb530c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
homepage: "https://stape.io/"
versions:
- sha: 374d9fb523f4034cc10f464966379c06475e73c4
changeNotes: Fix email marketing subscription.
- sha: 7140d1a3f2e8d724f2efb732b01fd38dd479557d
changeNotes: Update API to 2024-06-15 & fix issues.
- sha: e5257f62b01b703b7cf312ad52e3ffd343cf9967
Expand Down
2 changes: 1 addition & 1 deletion template.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function addToList() {
};

if (data.subscribeToMarketingEmails) {
addToListData.data.attributes.subscriptions = {
addToListData.data.attributes.profiles.data[0].attributes.subscriptions = {
email: {
marketing: {
consent: 'SUBSCRIBED'
Expand Down
2 changes: 1 addition & 1 deletion template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ function addToList() {
};

if (data.subscribeToMarketingEmails) {
addToListData.data.attributes.subscriptions = {
addToListData.data.attributes.profiles.data[0].attributes.subscriptions = {
email: {
marketing: {
consent: 'SUBSCRIBED'
Expand Down

0 comments on commit cbb530c

Please sign in to comment.