Support » Plugin: NS Cloner - Site Copier » Fetal Error on Unix Cron.

  • Resolved msolution


    I have used the add schedule method as suggested on your docs to add NS cloner on third party plugins, in my own plugin; The plugin works like a charm.

    When I run a Unix cron to i get an Fetal Error call to undefined function get_plugins() on class-ns-cloner-log.php on line 322,

    The same error is seen when called via WP REST API.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Never Settle


    Hey there,

    Can you try adding the following snippet and see if this resolves the issue?

    add_action( 'ns_cloner_cron', function(){
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    }, 1 );
    Thread Starter msolution


    thanks for your response, 🙂

    i added a similar code on ‘ns_cloner_before_init’ hook, it worked out good!

    keep up the good work, this works like a charm!


    • This reply was modified 1 year, 5 months ago by msolution. Reason: resolved
    Plugin Author Never Settle


    Excellent! You’re most welcome and thanks for the kind words.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fetal Error on Unix Cron.’ is closed to new replies.