You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/class-freemius.php
+31-20Lines changed: 31 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -5451,7 +5451,7 @@ function _plugin_code_type_changed() {
5451
5451
5452
5452
if ( $this->is_registered() ) {
5453
5453
// Schedule code type changes event.
5454
-
$this->schedule_install_sync();
5454
+
$this->maybe_schedule_install_sync_cron();
5455
5455
}
5456
5456
5457
5457
/**
@@ -6514,6 +6514,33 @@ private function maybe_schedule_sync_cron() {
6514
6514
$this->schedule_sync_cron();
6515
6515
}
6516
6516
6517
+
/**
6518
+
* Instead of running blocking install sync event, execute non blocking scheduled cron job.
6519
+
*
6520
+
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding specified blog ID from being the cron job executor.
6521
+
*
6522
+
* @author Leo Fajardo (@leorw)
6523
+
* @since 2.9.1
6524
+
*/
6525
+
private function maybe_schedule_install_sync_cron( $except_blog_id = 0 ) {
6526
+
if ( ! $this->is_user_in_admin() ) {
6527
+
return;
6528
+
}
6529
+
6530
+
if ( $this->is_clone() ) {
6531
+
return;
6532
+
}
6533
+
6534
+
if (
6535
+
// The event has been properly scheduled, so no need to reschedule it.
@@ -6611,22 +6638,6 @@ private function get_install_sync_cron_blog_id() {
6611
6638
return $this->get_cron_blog_id( 'install_sync' );
6612
6639
}
6613
6640
6614
-
/**
6615
-
* Instead of running blocking install sync event, execute non blocking scheduled wp-cron.
6616
-
*
6617
-
* @author Vova Feldman (@svovaf)
6618
-
* @since 1.1.7.3
6619
-
*
6620
-
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
6621
-
*/
6622
-
private function schedule_install_sync( $except_blog_id = 0 ) {
0 commit comments