Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter mgereta

    (@mgereta)

    Re: Jon Brown

    On Monday I created a non-intrusive fix for this:

    add_action('wp_loaded', 'mg_init_wc_admin');
    
    function mg_init_wc_admin(){
        if(defined( 'DOING_CRON' )) {
            WC()->session = new WC_Session_Handler();
            WC()->session->init();
        }
    }

    Because this was happening within the cronjob for subscriptions, I just simply create the session when WP is loaded. I havent had an error since.

Viewing 1 replies (of 1 total)