You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/managed-tests/validation.md
+23-22Lines changed: 23 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Validation tests ensure that your extension’s metadata and WooCommerce feature
7
7
-**readme.txt file:**
8
8
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).
9
9
10
-
-**Plugin headers:**
10
+
-**Plugin headers:**
11
11
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:
12
12
-`Requires PHP`
13
13
-`Requires at least`
@@ -19,49 +19,50 @@ Validation tests ensure that your extension’s metadata and WooCommerce feature
19
19
Missing or incorrect versions will trigger a warning. Additionally, certain headers should **not** be included:
20
20
-`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.
21
21
22
-
-**WooCommerce feature compatibility:**
22
+
-**WooCommerce feature compatibility:**
23
23
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.
28
28
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.
33
31
34
32
## Possible outcomes
35
33
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.
38
39
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.
41
42
42
43
## Interpreting results
43
44
44
-
If you receive warnings:
45
+
If you receive warnings or errors:
45
46
46
-
-**Check your readme.txt file:**
47
+
-**Check your readme.txt file:**
47
48
Ensure a correctly named readme.txt file is provided in the root directory of your plugin or theme.
48
49
49
-
-**Review headers and declarations:**
50
+
-**Review headers and declarations:**
50
51
Ensure all required headers are accurate and that you’re not declaring incompatibility with features you could support.
51
52
52
-
-**Address outdated templates (for themes):**
53
+
-**Address outdated templates (for themes):**
53
54
Update your theme’s templates to meet the latest WooCommerce standards.
54
55
55
-
-**Remove or correct restricted headers:**
56
+
-**Remove or correct restricted headers:**
56
57
Do not include `Woo` manually, and ensure all other headers are properly formatted and spelled.
57
58
58
59
## Best practices
59
60
60
-
-**Maintain accurate metadata:**
61
+
-**Maintain accurate metadata:**
61
62
Keep headers updated with each release, reflecting the correct PHP, WordPress, and WooCommerce version requirements.
62
63
63
-
-**Embrace modern WooCommerce features:**
64
+
-**Embrace modern WooCommerce features:**
64
65
Instead of declaring incompatibility, aim to support HPOS and Cart/Checkout blocks. This avoids warnings and improves merchant satisfaction.
65
66
66
-
-**Stay current:**
67
+
-**Stay current:**
67
68
Run validation tests regularly and promptly update outdated templates, headers, or feature declarations.
0 commit comments