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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user