Use newsletters API to get free statistics when premium is not active

[MAILPOET-2104]
This commit is contained in:
Ján Mikláš
2019-06-25 10:03:07 +02:00
committed by M. Shull
parent 50d9ff7686
commit 6a6299177f
2 changed files with 28 additions and 2 deletions

View File

@@ -73,8 +73,8 @@ class CampaignStatsPage extends React.Component {
MailPoet.Ajax.post({
api_version: window.mailpoet_api_version,
endpoint: 'stats',
action: 'get',
endpoint: window.mailpoet_premium_active ? 'stats' : 'newsletters',
action: window.mailpoet_premium_active ? 'get' : 'getWithStats',
data: {
id,
},