Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark marketing task as complete when an extension is installed #32630

Merged
merged 4 commits into from
Apr 20, 2022

Conversation

octaedro
Copy link
Contributor

@octaedro octaedro commented Apr 14, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes #32149.

How to test the changes in this Pull Request:

  1. In a brand new store, go through the OBW, and in step 4 (Business Details), go to Free features and install the MailPoet extension.
  2. Finish the OBW.
  3. Go to the Home screen and verify that the marketing task is marked as completed.
  4. Delete the MailPoet extension.
  5. Verify that the marketing task is not marked as completed now.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file by running pnpm nx affected --target=changelog?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Apr 14, 2022
@octaedro octaedro marked this pull request as ready for review April 18, 2022 18:12
@octaedro octaedro requested a review from a team April 18, 2022 18:13
@joelclimbsthings joelclimbsthings requested review from joelclimbsthings and removed request for a team April 18, 2022 19:36
if (
count( $installed ) > 0 ||
Task::is_task_actioned( 'marketing' ) ||
count( $remaining ) === 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, this condition seems a little redundant with the first one, since $remaining is just the inverse of $installed, but perhaps it's needed to capture the condition that there are no plugins?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! I removed the redundant condition in commit 48a3724

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @octaedro , tests well and looks good. Left a quick question, but not a blocker by any means. 🚢

@octaedro
Copy link
Contributor Author

Thank you @joelclimbsthings for the review, I addressed the change you mentioned.
Could you take another look at this PR?

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right on @octaedro , looks great! 🚢

@octaedro octaedro merged commit f2eb060 into trunk Apr 20, 2022
@octaedro octaedro deleted the fix/32149_mark_marketing_task_as_complete branch April 20, 2022 21:07
@github-actions github-actions bot added this to the 6.6.0 milestone Apr 20, 2022
@github-actions
Copy link
Contributor

Hi @octaedro, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is not possible to mark the marketing task as complete in the setup tasklist
2 participants