Skip to content

Commit

Permalink
Ads: Deactivate module if plan changes (#6242)
Browse files Browse the repository at this point in the history
* Deactivate Ads if plan changes to no longer support it

* Updated to use $to_deactivate instead of deactivate_module
  • Loading branch information
dbspringer authored and dereksmart committed Feb 1, 2017
1 parent 019fa37 commit 9d5b9ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _inc/lib/admin-pages/class.jetpack-admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ function check_plan_deactivate_modules( $page ) {
$active = Jetpack::get_active_modules();
switch ( $current->plan->product_slug ) {
case 'jetpack_free':
$to_deactivate = array( 'seo-tools', 'videopress', 'google-analytics' );
$to_deactivate = array( 'seo-tools', 'videopress', 'google-analytics', 'wordads' );
break;
case 'jetpack_personal':
case 'jetpack_personal_monthly':
$to_deactivate = array( 'seo-tools', 'videopress', 'google-analytics' );
$to_deactivate = array( 'seo-tools', 'videopress', 'google-analytics', 'wordads' );
break;
case 'jetpack_premium':
case 'jetpack_premium_monthly':
Expand Down
2 changes: 2 additions & 0 deletions class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@ public static function get_active_plan() {
'videopress',
'akismet',
'vaultpress',
'wordads',
);
}

Expand All @@ -1262,6 +1263,7 @@ public static function get_active_plan() {
'vaultpress',
'seo-tools',
'google-analytics',
'wordads',
);
}

Expand Down

0 comments on commit 9d5b9ca

Please sign in to comment.