This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
Testing Coupons Feature in WC 4.x
Jason Conroy edited this page Jul 23, 2020
·
6 revisions
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Navigate to WooCommerce > Coupons (click the menu item)
- Confirm you are redirected to the new location WooCommerce > Marketing > Coupons and that the admin notice is visible at the top of the page.
- Click the action button “Remove legacy coupon menu”
- The notice should close, you should be redirected to WooCommerce > Marketing > Coupons and legacy menu item WooCommerce > Coupons should no longer be available.
- Navigate to any other admin page
- Confirm the notice no longer appears
- Navigate to WooCommerce > Marketing > Coupons
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Navigate to WooCommerce > Marketing > Coupons
- Add a coupon
- Confirm coupon is visible on WooCommerce > Marketing > Coupons
- Confirm able to perform coupon management actions like search, filter, edit, trash
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Confirm WooCommerce > Marketing > Coupons is visible
- Now go and disable coupon management
- Confirm WooCommerce > Marketing > Coupons is not visible (note it will require a page refresh after saving the option for the menu items to update so you will need to click on another page or refresh - it does the same thing for the coupon menu in the existing location)
Recommended extensions icons are currently a default grey icon - we can update remotely.
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Ensure Marketplace Suggestions option is enabled
- Navigate to WooCommerce > Marketing > Coupons
- Confirm Recommended Extensions card is visible and populated with recommendations
- Click on a recommendation to be given the option to purchase
- Confirm back button redirects you back to WooCommerce > Marketing > Coupons
- Now go and disable Marketplace Suggestions
- Go back to WooCommerce > Marketing > Coupons and confirm the Recommended Extensions card is not visible
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Ensure Marketplace Suggestions option is enabled
- Navigate to WooCommerce > Marketing > Coupons
- Confirm Recommended Extensions card is visible and populated with recommendations
- Click on a recommendation and follow process to purchase and install an extension or manually upload one https://wordpress.org/support/article/managing-plugins/#manual-upload-via-wordpress-admin
- Navigate to WooCommerce > Marketing > Coupons and confirm that the extension is no longer listed as a recommendation.
Currently on 3 Coupon related posts.
- Setup a new site with 4.x
- Ensure coupon management is enabled
- Navigate to WooCommerce > Marketing > Coupons
- Confirm that the “Knowledgebase Articles” card is visible
- Confirm that article can be clicked on and that you are directed to the article on WooCommerce.com
- Setup a new site with 4.x
- Change your profile color scheme
- Navigate to WooCommerce > Marketing and WooCommerce > Marketing > Coupons
- Confirm color schemes are adjusted to accommodate profile color scheme changes
- Currently setup using a "coupons" feature flag, targeted at development and plugin (but not core)
-
wc_admin_show_legacy_coupon_menu
option controls if the legacy menu item is present. Set to “1” to show (or delete it). - This can be disabled by setting the
coupons
feature flag tofalse
- example using a filter https://gist.github.com/jconroy/e21c146aefa4301397b65d430f80dc05 - If people disable the marketing feature we disable coupon feature
- Additional menu items can be added like so
Coupons e2e tests here: https://github.com/woocommerce/woocommerce/blob/master/tests/e2e/specs/wp-admin/wp-admin-coupon-new.test.js simply go straight to wp-admin/post-new.php?post_type=shop_coupon which hasn’t changed. In theory everything should work as normal.