Bug : The script is breaking from front end.
My Use case of this library
I'm using this library to schedule an execution that will make an api call when if order will be place from Store.
Current behaviour
This is scheduling process and making API calls as expected.
Crucial Bug
- After dispatch it's breaking script that is causing the thankyou page is not fully loading.
- Some hooks are not getting triggered which does after placing order on thankyou page
Found the cause
After struggling I tried some debugging and found that in the file classes/wp-background-process.php,
there is function public function schedule_cron_healthcheck( $schedules ) which is filter callback.
$interval = apply_filters( $this->identifier . '_cron_interval', 5 );
if ( property_exists( $this, 'cron_interval' ) ) { $interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval ); }
If I comment this three line the thankyou page is not breaking and all actions are being executed But result is If I comment above lines the handle function is not calling and API is not performing.
Please look into this and suggest If I can do any changes to get it working as expected.
Will be waiting to hear from Envelopment Team
We are facing the exact same issue
This is strange, commenting out the following stops a page on your site from breaking?
if ( property_exists( $this, 'cron_interval' ) ) {
$interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval );
}
If so ...
- Have you added a
$cron_intervalproperty to yourWP_Background_Processsubclass? - What is the (Fatal?) error being thrown without those lines commented out?
- What version of PHP is in use?