radium-one-click-demo-install icon indicating copy to clipboard operation
radium-one-click-demo-install copied to clipboard

Hide "Import Demo Data" button after importing

Open umairrazzaq opened this issue 8 years ago • 2 comments

Hi, first of all i would to say big thanks to you for making our life much easier by providing this very useful function. It really works like charm, but I'm wandering if it can set to hide after importing content successfully?

umairrazzaq avatar May 08 '16 22:05 umairrazzaq

Hi,

Why you want hide import button ? Sometimes demo importer not works as well, then user need to re-import content. This is happened for my clients multiple times. Because wp issue or internet speed.

I think is better if you check, if imported before then just show a message that once demo imported. For this purpose you can set new option for checking demo importer button, example:

if ( get_option( 'is_demo_imported' ) ) {
  // echo 'This demo was imported before.';
}

If you're importing demo(s) via ajax process, so you can easily update_option after each imports.

Regards

Codevz avatar May 09 '16 03:05 Codevz

Thanks a lot for reply. yes i think its the better way to handle this. My concern only was to make its process more simple & clean. Thanks again.

umairrazzaq avatar May 14 '16 14:05 umairrazzaq