This is useful to skip the last step of the RAS wizard, that consists of configuring each Campaign Prompt from the defaults we offer.
With this command you can instead import campaigns from a json file exported from a site used as a model, and then programatically go through that last step on the checklist.
In the future we can expand this migrator to programatically go through other steps in the RAS wizard.
How to test
Take a site with many prompts and segments and export its contents wp newspack-popups export --file=newspack-campaigns.json
Put this json file in an publicly accessible URL
Go to another brand new site and go through the RAS wizard until the last step "Reader Activation Campaign" - Don't complete this last step
Run this command: newspack-content-migrator ras-campaign-migrator https://yoursite.com/newspack-campaigns.json
Confirm RAS is now enabled and the campaigns prompts have been properly created
This is useful to skip the last step of the RAS wizard, that consists of configuring each Campaign Prompt from the defaults we offer.
With this command you can instead import campaigns from a json file exported from a site used as a model, and then programatically go through that last step on the checklist.
In the future we can expand this migrator to programatically go through other steps in the RAS wizard.
How to test
wp newspack-popups export --file=newspack-campaigns.json
newspack-content-migrator ras-campaign-migrator https://yoursite.com/newspack-campaigns.json