Skip to content

Adds Settings Moved inbox note#2397

Merged
ibndawood merged 4 commits intodevelopfrom
add/2340-move-notice-to-inbox
Nov 25, 2022
Merged

Adds Settings Moved inbox note#2397
ibndawood merged 4 commits intodevelopfrom
add/2340-move-notice-to-inbox

Conversation

@ibndawood
Copy link
Copy Markdown
Contributor

@ibndawood ibndawood commented Nov 24, 2022

Changes proposed in this Pull Request:

Closes #2299.

This PR is the same as #2340. The Notes folder and the corresponding addition of the SettingsMoved note were removed during a merge. This PR restores the removed code.

  • Do the changed files pass phpcs checks? Please remove phpcs:ignore comments in changed files and fix any issues, or delete if not practical.

Screenshots:

image

Detailed test instructions:

  1. Generate the build from this PR by running npm run build
  2. Use local to set up 2 WordPress installations.
  3. In one instance, download v2.1.4 from here: https://downloads.wordpress.org/plugin/facebook-for-woocommerce.2.1.4.zip, and install and activate Facebook for WooCommerce.
  4. After activation, navigate to Plugins > Add New > Upload Plugin and upload the zip file generated from step 1. We are now upgrading from v2.1.4 to the version in the build.
  5. Activate the plugin after the update and navigate to WooCommerce > Home. The Inbox should have a note as shown in the screenshot.
  6. In another instance, install the build from the PR. Verify that no admin notices or inbox notes are added.
  7. Verify the admin notice "Heads up! The Facebook menu is now located under the Marketing menu" is not displayed anywhere.

Additional details:

The Facebook menu was moved under the Marketing menu in the WP admin panel in v2.2.0. This note should be displayed only to users updating the plugin from before v2.2.0.

The Lifecycle handler stores events such as installation and upgrade. It does not record downgrades. It also stores the latest version in the options table using this key: wc_facebook_for_woocommerce_version. This key is not updated on downgrades. Hence, it does not record events such as upgrades if we do them after installing a recent version.

For example, if we install v2.6.28 and then downgrade to v2.1.4, and then upgrade to v2.6.27, the last upgrade will not be recorded. Hence for testing, we need to use 2 separate installations.

Changelog entry

Add - Inbox note about Facebook menu moved under the Marketing menu.

@github-actions github-actions bot added changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement. labels Nov 24, 2022
@ibndawood ibndawood marked this pull request as ready for review November 24, 2022 12:07
@ibndawood ibndawood requested a review from a team November 24, 2022 12:07
Copy link
Copy Markdown
Contributor

@layoutd layoutd left a comment

Choose a reason for hiding this comment

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

Works as indicated in testing. Looks good! :shipit:

❔ Confirming the PHPCS config changes included in the PR are intentional.
❔ Confirming Closes #2340 is correct in the description, as 2340 is a PR an not an issue.

@ibndawood
Copy link
Copy Markdown
Contributor Author

Thank you @layoutd for the review.

  • The phpcs ruleset we currently have was inherited from GLA. The ruleset that we used before 3.0.0 was based on WooCommerce. We are moving towards adopting this standard again. Hence I want to remove the relevant rules that were related to this PR.
  • Good catch. I made a mistake here. It should have been the issue number and not the PR number. I'll update the PR description.

@ibndawood ibndawood merged commit cfec15a into develop Nov 25, 2022
@ibndawood ibndawood deleted the add/2340-move-notice-to-inbox branch November 25, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move The Facebook menu is now located... message to inbox.

2 participants