Closed JoomFX closed 7 years ago
Hi,
thanks for the kind words :)
About your code, I think the issue is in the global $wp_filesystem;
. It's not defined by default (it's null
), so you have to initialize the WP_Filesystem class first. More info here https://codex.wordpress.org/Filesystem_API.
Take care!
Hey @capuderg ,
You were right!
After initializing WP_Filesystem
everything works just fine!
Thanks a lot mate and have a wonderful weekend 😉
Hi @JoomFX,
no problem :)
If you haven't yet, please write a review here: https://wordpress.org/support/plugin/one-click-demo-import/reviews/ We would really appreciate it!
Have a nice weekend as well.
Take care!
Hey guys,
First of all, thank you very much for the awesome plugin!
I'm trying to clear the WP cache (delete the
cache
folder) onpt-ocdi/after_import
. Here's my code:But when I try to Import the Demo Data, I get
Error: Internal Server Error (500)
(see this screenshot).If I remove the following code, then everything works fine - the Demo Data is imported but the cache is not cleared:
I also tried with
wp_cache_flush()
but it doesn't clear the content of thewp-content/cache
folder:I'm really not good with PHP so I hope that I'm missing something simple. Thanks a lot for your help 😉