Skip to content

Commit

Permalink
Merge pull request #2648 from Automattic/fix/gumroad-org-plugin-view
Browse files Browse the repository at this point in the history
Plugin: fix buisness plugin redirect issue
  • Loading branch information
enejb committed Jan 21, 2016
2 parents 2085b6b + 8032765 commit 53d8f99
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/my-sites/plugins/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ function renderSinglePlugin( context, siteUrl, isWpcomPlugin ) {
}

if (
( ! site || ! site.jetpack ) &&
( site && ! site.jetpack ) &&
businessPlugins.indexOf( pluginSlug ) >= 0 &&
context.path.indexOf( '/business' ) < 0
) {
return page.redirect( '/plugins/' + pluginSlug + '/business' + ( site ? '/' + site.slug : '' ) );
}

if ( ! site &&
context.path.indexOf( '/business' ) >= 0 &&
-1 === businessPlugins.indexOf( pluginSlug )
) {
return page.redirect( '/plugins/' + pluginSlug );
}

analytics.pageView.record( baseAnalyticsPath, analyticsPageTitle + ' > Plugin Details' );

// Scroll to the top
Expand Down

0 comments on commit 53d8f99

Please sign in to comment.