I have a WordPress plugin that helps you create call to action boxes. You just select a template from the templates provided by plugin, customize the box using the settings given and publish the box on your site.
All the templates are stored in the /plugin-name/templates/ folder. The plugin has functionality that allows users to add custom templates to the /plugin-name/templates/ folder.
Now the problem is whenever a user uploads a custom template and update the plugin, all plugin files get over written and the template gets removed.
What should I do to prevent this over writing for just the templates folder?
This is how the templates folder look like: