woocommerce/plugins/woocommerce-blocks/docs/testing/releases/272.md

2.4 KiB

Create Todo list

Testing Notes and ZIP for testing

Zip File for testing: woocommerce-gutenberg-products-block.zip

Note: This zip file has 2.7.1 as the version showing in WordPress but it is actually 2.7.2.

This release impacts the logic around draft order cleanup.

Variations of tests:

When distributed as a package in WooCommerce Core.

Expected behaviour here is:

  • woocommerce_cleanup_draft_orders action should not appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).

These actions only appear when the feature flag is on for the install. If you are not testing the package inclusion in WooCommerce core, you can simulate this by adding a blocks.ini file to the same directory as where this plugin is activated and include in the file the following code:

woocommerce_blocks_phase = 1

(remember to remove tha file after testing!)

When distributed as the feature plugin.

Expected behaviour is:

  • woocommerce_cleanup_draft_orders action should appear in the scheduled tasks for Action Scheduler (Tools->Scheduled Actions).
  • Create a draft order (on the frontend load the checkout block with products in the cart and do not complete the order).
  • Trigger the scheduled action for woocommerce_cleanup_draft_orders and verify the just created draft order and none of the other orders on your test site have been deleted.
  • Modify the draft order date so that it's greater than 24 hours in the past from now (you need to modify the post_modifed_gmt field)
  • Trigger the scheduled action again, this time the draft order you modified (and only that draft order) should be deleted.

There are phpunit tests covering behaviour as well (including catching errors).


We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.