Skip to content

Commit 0ef8317

Browse files
committed
[bundle] [license-activation] Fix the bundle license auto-activation mechanism.
1 parent 2f519d9 commit 0ef8317

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

includes/class-freemius.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7834,15 +7834,18 @@ private function activate_bundle_license( $license, $sites = array(), $current_b
78347834
continue;
78357835
}
78367836

7837-
if (
7838-
! $fs->is_addon() &&
7839-
! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans )
7840-
) {
7837+
if ( ! $fs->is_addon() && $fs->has_bundle_context() && $fs->is_registered() ) {
78417838
/**
78427839
* The parent product can be free-only but can have its `has_paid_plan` flag set to `true` when
7843-
* there is a context bundle.
7840+
* there is a context bundle. Ensure plans are synced before checking.
78447841
*/
7845-
continue;
7842+
if ( empty( $fs->_plans ) ) {
7843+
$fs->_sync_plans();
7844+
}
7845+
7846+
if ( ! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans ) ) {
7847+
continue;
7848+
}
78467849
}
78477850

78487851
if ( $current_blog_id > 0 ) {

start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.13.2.1';
18+
$this_sdk_version = '2.13.2.2';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

0 commit comments

Comments
 (0)