From 9b25a265e5f8286b10167807be7398574081b221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A0Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Fri, 1 Aug 2025 09:21:54 +0200 Subject: [PATCH 1/2] Add missing system_status/tools endpoints --- .../wp-api-v2/_system-status-tools.md | 162 ++++++++++++++++++ .../wp-api-v3/_system-status-tools.md | 162 ++++++++++++++++++ 2 files changed, 324 insertions(+) diff --git a/source/includes/wp-api-v2/_system-status-tools.md b/source/includes/wp-api-v2/_system-status-tools.md index 1747ba38..e2824a0a 100644 --- a/source/includes/wp-api-v2/_system-status-tools.md +++ b/source/includes/wp-api-v2/_system-status-tools.md @@ -175,6 +175,60 @@ woocommerce.get("system_status/tools").parsed_response ] } }, + { + "id": "clear_expired_download_permissions", + "name": "Used-up download permissions", + "action": "Clean up download permissions", + "description": "This tool will delete expired download permissions and permissions with 0 remaining downloads.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/clear_expired_download_permissions" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "regenerate_product_lookup_tables", + "name": "Product lookup tables", + "action": "Regenerate", + "description": "This tool will regenerate product lookup table data. This process may take a while.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/regenerate_product_lookup_tables" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "repair_coupons_lookup_table", + "name": "Coupons lookup table", + "action": "Repair", + "description": "This tool will repair the coupons lookup table data with missing discount amounts. This process may take a while.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/repair_coupons_lookup_table" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, { "id": "recount_terms", "name": "Term counts", @@ -229,6 +283,42 @@ woocommerce.get("system_status/tools").parsed_response ] } }, + { + "id": "clear_template_cache", + "name": "Clear template cache", + "action": "Clear", + "description": "Note: This tool will empty the template cache.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/clear_template_cache" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "clear_system_status_theme_info_cache", + "name": "Clear system status theme info cache", + "action": "Clear", + "description": "Note: This tool will empty the system status theme info cache.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/clear_system_status_theme_info_cache" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, { "id": "install_pages", "name": "Install WooCommerce pages", @@ -282,6 +372,78 @@ woocommerce.get("system_status/tools").parsed_response } ] } + }, + { + "id": "regenerate_thumbnails", + "name": "Regenerate shop thumbnails", + "action": "Regenerate", + "description": "This will regenerate all shop thumbnails to match your theme and/or image settings.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/regenerate_thumbnails" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "db_update_routine", + "name": "Update database", + "action": "Update database", + "description": "Note: This tool will update your WooCommerce database to the latest version. Please ensure you make sufficient backups before proceeding.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/db_update_routine" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "recreate_order_address_fts_index", + "name": "Re-create Order Address FTS index", + "action": "Recreate index", + "description": "This tool will recreate the full text search index for order addresses. If the index does not exist, it will try to create it.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/recreate_order_address_fts_index" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } + }, + { + "id": "verify_db_tables", + "name": "Verify base database tables", + "action": "Verify database", + "description": "Verify if all base database tables are present.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools/verify_db_tables" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v2/system_status/tools" + } + ] + } } ] ``` diff --git a/source/includes/wp-api-v3/_system-status-tools.md b/source/includes/wp-api-v3/_system-status-tools.md index f3193476..eec51a2a 100644 --- a/source/includes/wp-api-v3/_system-status-tools.md +++ b/source/includes/wp-api-v3/_system-status-tools.md @@ -175,6 +175,60 @@ woocommerce.get("system_status/tools").parsed_response ] } }, + { + "id": "clear_expired_download_permissions", + "name": "Used-up download permissions", + "action": "Clean up download permissions", + "description": "This tool will delete expired download permissions and permissions with 0 remaining downloads.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/clear_expired_download_permissions" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "regenerate_product_lookup_tables", + "name": "Product lookup tables", + "action": "Regenerate", + "description": "This tool will regenerate product lookup table data. This process may take a while.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/regenerate_product_lookup_tables" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "repair_coupons_lookup_table", + "name": "Coupons lookup table", + "action": "Repair", + "description": "This tool will repair the coupons lookup table data with missing discount amounts. This process may take a while.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/repair_coupons_lookup_table" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, { "id": "recount_terms", "name": "Term counts", @@ -229,6 +283,42 @@ woocommerce.get("system_status/tools").parsed_response ] } }, + { + "id": "clear_template_cache", + "name": "Clear template cache", + "action": "Clear", + "description": "Note: This tool will empty the template cache.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/clear_template_cache" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "clear_system_status_theme_info_cache", + "name": "Clear system status theme info cache", + "action": "Clear", + "description": "Note: This tool will empty the system status theme info cache.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/clear_system_status_theme_info_cache" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, { "id": "install_pages", "name": "Install WooCommerce pages", @@ -282,6 +372,78 @@ woocommerce.get("system_status/tools").parsed_response } ] } + }, + { + "id": "regenerate_thumbnails", + "name": "Regenerate shop thumbnails", + "action": "Regenerate", + "description": "This will regenerate all shop thumbnails to match your theme and/or image settings.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/regenerate_thumbnails" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "db_update_routine", + "name": "Update database", + "action": "Update database", + "description": "Note: This tool will update your WooCommerce database to the latest version. Please ensure you make sufficient backups before proceeding.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/db_update_routine" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "recreate_order_address_fts_index", + "name": "Re-create Order Address FTS index", + "action": "Recreate index", + "description": "This tool will recreate the full text search index for order addresses. If the index does not exist, it will try to create it.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/recreate_order_address_fts_index" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } + }, + { + "id": "verify_db_tables", + "name": "Verify base database tables", + "action": "Verify database", + "description": "Verify if all base database tables are present.", + "_links": { + "self": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools/verify_db_tables" + } + ], + "collection": [ + { + "href": "https://example.com/wp-json/wc/v3/system_status/tools" + } + ] + } } ] ``` From 2a7efbae37bd9b8595bc52d4617dd47a0c69025f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A0Ja=CC=81n=20Mikla=CC=81s=CC=8C?= Date: Fri, 1 Aug 2025 09:35:57 +0200 Subject: [PATCH 2/2] Removed "reset_tracking" endpoint, which was removed in WC 3.6 https://github.com/woocommerce/woocommerce/pull/22899 --- .../includes/wp-api-v2/_system-status-tools.md | 18 ------------------ .../includes/wp-api-v3/_system-status-tools.md | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/source/includes/wp-api-v2/_system-status-tools.md b/source/includes/wp-api-v2/_system-status-tools.md index e2824a0a..e118d385 100644 --- a/source/includes/wp-api-v2/_system-status-tools.md +++ b/source/includes/wp-api-v2/_system-status-tools.md @@ -355,24 +355,6 @@ woocommerce.get("system_status/tools").parsed_response ] } }, - { - "id": "reset_tracking", - "name": "Reset usage tracking settings", - "action": "Reset usage tracking settings", - "description": "This will reset your usage tracking settings, causing it to show the opt-in banner again and not sending any data.", - "_links": { - "self": [ - { - "href": "https://example.com/wp-json/wc/v2/system_status/tools/reset_tracking" - } - ], - "collection": [ - { - "href": "https://example.com/wp-json/wc/v2/system_status/tools" - } - ] - } - }, { "id": "regenerate_thumbnails", "name": "Regenerate shop thumbnails", diff --git a/source/includes/wp-api-v3/_system-status-tools.md b/source/includes/wp-api-v3/_system-status-tools.md index eec51a2a..4eae286d 100644 --- a/source/includes/wp-api-v3/_system-status-tools.md +++ b/source/includes/wp-api-v3/_system-status-tools.md @@ -355,24 +355,6 @@ woocommerce.get("system_status/tools").parsed_response ] } }, - { - "id": "reset_tracking", - "name": "Reset usage tracking settings", - "action": "Reset usage tracking settings", - "description": "This will reset your usage tracking settings, causing it to show the opt-in banner again and not sending any data.", - "_links": { - "self": [ - { - "href": "https://example.com/wp-json/wc/v3/system_status/tools/reset_tracking" - } - ], - "collection": [ - { - "href": "https://example.com/wp-json/wc/v3/system_status/tools" - } - ] - } - }, { "id": "regenerate_thumbnails", "name": "Regenerate shop thumbnails",