Is there a way to prevent data destruction on WP Loader install? #777
Replies: 1 comment
-
Hi @mikesetzer, the The You can use The |
Beta Was this translation helpful? Give feedback.
-
Hi @mikesetzer, the The You can use The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When running tests on plugins that modify or alter existing posts, it would be preferable for WPLoader to leave the existing posts alone when it reinstalls. I have a test db for this, but the data is destroyed each time, even with skipInstall active.
For reference, when a post is saved, my plugin fetches data from options, sends that data to an api, and processes the results and saves it to the post meta. It can also do this in bulk using cron and a frontend UI. To test these, I need a set of existing posts, and I need up-to-date options set, as these contain the configs for the plugin. I can create a command that pulls in my existing DB to test to ensure that the data is up to date before the test runs, but want to avoid WP_Loader destroying that data before I run the tests.
Is there a way around this? Or should I not be using WPLoader at all in this case?
Beta Was this translation helpful? Give feedback.
All reactions