woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Update PPCP upgrade notice #886

Closed jorgeatorres closed 2 years ago

jorgeatorres commented 2 years ago

Description

This PR updates the text for the PPCP upgrade notice on the Plugins screen to reflect the latest info available. Also, makes the notice dismissible (hiding it for a month).

Steps to test:

  1. Uninstall PayPal Payments (if installed).
  2. Go to the Plugins screen in your admin dashboard.
  3. Take a look at the current notice under the "PayPal Checkout" plugin row.
  4. Check out this branch (fix-notice).
  5. Confirm that the text and notice colors have changed.
  6. Play with the buttons (Upgrade/Activate/Learn More") and confirm they are working as expected:
    • The "upgrade" button should trigger an install of PayPal Payments.
    • The "activate" button should activate the PayPal Payments plugin (if installed but inactive).
    • Removing the PayPal Payments plugin should bring back the "upgrade" button.
  7. Click the "X" to dismiss the message.
  8. Confirm that the notice has disappeared.
  9. Refresh the page and confirm that the notice is not displayed.
  10. Remove from the wp_options table, rows with option_name equal to _transient_timeout_ppec-upgrade-notice-dismissed and _transient_ppec-upgrade-notice-dismissed to simulate a month has passed.
  11. Refresh the page and see the notice again.

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Make upgrade notice dismissible and update it with new text.

LCmry commented 2 years ago

Hi @jorgeatorres , everything is working as expected except dismissing the message. It goes away when I click the 'X' but refreshing the page has it coming back.

jorgeatorres commented 2 years ago

everything is working as expected except dismissing the message. It goes away when I click the 'X' but refreshing the page has it coming back.

I can't seem to reproduce this. @LCmry: can you check the dev tools (Network tab) to see if clicking the 'X' triggers an AJAX request? If so, what's the response? If not, and you previously had PPEC installed, it might be a cache issue. Would you mind trying on a different browser or clearing the cache?

LCmry commented 2 years ago

It looks like it was a cache thing, thanks for the direction there.

LGTM 👍