fix(admin): repair email rollback and product taxonomy APIs

Call the existing Email_Rollback::list_pending method instead of the missing
list_recent_changes method that caused /email-rollback/users to fatal. Add
the product taxonomy route expected by ProductEditorDrawer and return
category/tag options for the editor.
This commit is contained in:
2026-07-11 12:20:33 +08:00
parent 4612e90e44
commit 7c56afa376
3 changed files with 38 additions and 1 deletions
@@ -168,6 +168,13 @@ class AKSRT_Admin_Shop_Controller extends AKSRT_Admin_Controller_Base {
'permission_callback' => [$this, 'check_permission'],
]);
// Product taxonomy options used by the product editor.
register_rest_route(self::API_NAMESPACE, '/shop/products/taxonomy', [
'methods' => 'GET',
'callback' => [$this, 'get_product_taxonomy'],
'permission_callback' => [$this, 'check_permission'],
]);
// Product list
register_rest_route(self::API_NAMESPACE, '/shop/products', [
'methods' => 'GET',