Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
psealock committed Jun 5, 2020
1 parent 05fee9f commit e62280e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions client/dashboard/customizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,15 @@ class CustomizableDashboard extends Component {
}

render() {
const { query, taskListHidden, taskListComplete } = this.props;
const {
query,
taskListHidden,
taskListComplete,
homepageEnabled,
} = this.props;

const isTaskListEnabled =
isOnboardingEnabled() &&
! taskListHidden &&
! window.wcAdminFeatures.homepage;
isOnboardingEnabled() && ! taskListHidden && ! homepageEnabled;

const isDashboardShown =
! isTaskListEnabled || ( ! query.task && taskListComplete );
Expand Down Expand Up @@ -340,6 +343,9 @@ export default compose(
};

if ( isOnboardingEnabled() ) {
withSelectData.homepageEnabled =
window.wcAdminFeatures.homepage &&
getOption( 'woocommerce_homescreen_enabled' ) === 'yes';
withSelectData.taskListHidden =
getOption( 'woocommerce_task_list_hidden' ) === 'yes';
withSelectData.taskListComplete =
Expand Down
2 changes: 1 addition & 1 deletion client/dashboard/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export function getProductIdsForCart(
installedPlugins
) {
const onboarding = getSetting( 'onboarding', {} );
const productIds = [];

// The population of onboarding.productTypes only happens if the task list should be shown
// so bail early if it isn't present.
if ( ! onboarding.productTypes ) {
return productIds;
}

const productIds = [];
const productTypes = profileItems.product_types || [];

productTypes.forEach( ( productType ) => {
Expand Down

0 comments on commit e62280e

Please sign in to comment.