Skip to content

Commit 3e49eea

Browse files
authored
Merge pull request #64 from woocommerce/25-03/update/validation-strictness
Update for stricter validation tests
2 parents dff5541 + a52b393 commit 3e49eea

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

docs/managed-tests/validation.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Validation tests ensure that your extension’s metadata and WooCommerce feature
77
- **readme.txt file:**
88
The test checks for the presence of a readme.txt file, which all plugins and themes are [required to provide](https://woocommerce.com/document/create-a-plugin/#section-8).
99

10-
- **Plugin headers:**
10+
- **Plugin headers:**
1111
The test checks for the presence of important headers in your plugin or theme’s main file and `readme.txt`. The following headers should be present and accurate:
1212
- `Requires PHP`
1313
- `Requires at least`
@@ -19,49 +19,50 @@ Validation tests ensure that your extension’s metadata and WooCommerce feature
1919
Missing or incorrect versions will trigger a warning. Additionally, certain headers should **not** be included:
2020
- `Woo` — As noted in the [WooCommerce plugin creation documentation](https://woocommerce.com/document/create-a-plugin/#section-14), this will be automatically added during deployment. Including it manually may cause issues and will be warned against.
2121

22-
- **WooCommerce feature compatibility:**
22+
- **WooCommerce feature compatibility:**
2323
The test checks if your extension declares incompatibility with key WooCommerce features:
24-
- **High Performance Order Storage (HPOS):**
25-
Extensions are expected to [support HPOS](https://developer.woocommerce.com/docs/hpos-extension-recipe-book/#2-supporting-high-performance-order-storage-in-your-extension), as it’s now the default for new stores.
26-
- **Cart and Checkout blocks:**
27-
Extensions that modify cart or checkout experiences should [support the cart and checkout blocks](https://developer.woocommerce.com/2023/11/06/faq-extending-cart-and-checkout-blocks/).
24+
- **High Performance Order Storage (HPOS):**
25+
Extensions are required to [support HPOS](https://developer.woocommerce.com/docs/hpos-extension-recipe-book/#2-supporting-high-performance-order-storage-in-your-extension) if they interact with orders, as it’s now the default for new stores. Declaring explicit incompatibility with this **will result in an error**, thus failing the validation test.
26+
- **Cart and Checkout blocks:**
27+
Extensions that modify cart or checkout experiences should [support the cart and checkout blocks](https://developer.woocommerce.com/2023/11/06/faq-extending-cart-and-checkout-blocks/). Declaring explicit incompatibility with this will result in a warning.
2828

29-
Declaring explicit incompatibility with these features will result in a warning.
30-
31-
- **Outdated theme templates (for themes):**
32-
If your theme uses outdated WooCommerce templates, the test will flag them. While currently these appear as warnings rather than failures, they should be addressed to ensure compatibility with the latest WooCommerce standards. Refer to the [WooCommerce developer documentation](https://developer.woocommerce.com/docs/how-to-fix-outdated-woocommerce-templates/) for guidance.
29+
- **Outdated theme templates (for themes):**
30+
If your theme uses outdated WooCommerce templates, the test **will flag them as an error and fail**. They must be addressed to ensure compatibility with the latest WooCommerce version. Refer to the [WooCommerce developer documentation](https://developer.woocommerce.com/docs/how-to-fix-outdated-woocommerce-templates/) for guidance.
3331

3432
## Possible outcomes
3533

36-
- **Success:**
37-
A readme.txt file is present, all required metadata is present and correct, and no invalid headers or incompatible feature declarations were found.
34+
- **Success:**
35+
A readme.txt file is present, all required metadata is present and correct, and no invalid headers or incompatible feature declarations were found. If you're a theme developer, all template files are up to date.
36+
37+
- **Warning:**
38+
Some headers may be missing or incorrect, or you declared incompatibility with WooCommerce features that you should ideally support.
3839

39-
- **Warning:**
40-
A readme.txt file may be missing or misnamed, some headers may be missing or incorrect, or you declared incompatibility with WooCommerce features that you should ideally support. If you’re a theme developer, outdated templates are flagged as warnings and should be updated.
40+
- **Failure:**
41+
A readme.txt file may be missing or misnamed, or you declared incompatibility with WooCommerce features that you are required to support. If you’re a theme developer, outdated templates are flagged as errors and must be updated.
4142

4243
## Interpreting results
4344

44-
If you receive warnings:
45+
If you receive warnings or errors:
4546

46-
- **Check your readme.txt file:**
47+
- **Check your readme.txt file:**
4748
Ensure a correctly named readme.txt file is provided in the root directory of your plugin or theme.
4849

49-
- **Review headers and declarations:**
50+
- **Review headers and declarations:**
5051
Ensure all required headers are accurate and that you’re not declaring incompatibility with features you could support.
5152

52-
- **Address outdated templates (for themes):**
53+
- **Address outdated templates (for themes):**
5354
Update your theme’s templates to meet the latest WooCommerce standards.
5455

55-
- **Remove or correct restricted headers:**
56+
- **Remove or correct restricted headers:**
5657
Do not include `Woo` manually, and ensure all other headers are properly formatted and spelled.
5758

5859
## Best practices
5960

60-
- **Maintain accurate metadata:**
61+
- **Maintain accurate metadata:**
6162
Keep headers updated with each release, reflecting the correct PHP, WordPress, and WooCommerce version requirements.
6263

63-
- **Embrace modern WooCommerce features:**
64+
- **Embrace modern WooCommerce features:**
6465
Instead of declaring incompatibility, aim to support HPOS and Cart/Checkout blocks. This avoids warnings and improves merchant satisfaction.
6566

66-
- **Stay current:**
67+
- **Stay current:**
6768
Run validation tests regularly and promptly update outdated templates, headers, or feature declarations.

0 commit comments

Comments
 (0)