woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Adds an option for displaying WooCommerce Inbox notifications #865

Closed mattallan closed 3 years ago

mattallan commented 3 years ago

Internal link: paJDYF-1uJ-p2 Parent GH link: 10117-gh-Automattic/woocommerce.com


Description

This PR adds the WC Admin inbox notification option to PPXO as per: pb0GrA-1cH-p2#comment-2063

Steps to test:

The option should be added on plugin activation and upgrade.

Plugin Activation

  1. Checkout branch wc_inbox_option
  2. Deactivate PayPal Checkout plugin
  3. Delete woocommerce_inbox_variant_assignment from wp_options if it already exists
  4. Activate PayPal Checkout
  5. Check woocommerce_inbox_variant_assignment is a random value from 1-12

Plugin Upgrade

  1. Delete woocommerce_inbox_variant_assignment from wp_options if it already exists
  2. Go into wp_options table and edit wc_ppec_version to be 1 version behind (i.e. 2.1.0)
  3. Reload an admin page to trigger an update
  4. Check woocommerce_inbox_variant_assignment is a random value from 1-12
LCmry commented 3 years ago

Thanks @mattallan. Other than the variable name, this looks good. I tested both scenarios and it worked as expected.

mattallan commented 3 years ago

Thanks for the review @LCmry ! I've just forced pushed that variable name preference 😃 This should be good for another review, thanks!