| @@ -2,10 +2,8 @@ | ||
| 2 | 2 | declare(strict_types=1); |
| 3 | 3 | |
| 4 | 4 | namespace Imagify\Abilities; |
| 5 | 5 | |
| 6 | -use Imagify\User\User; | |
| 7 | - | |
| 8 | 6 | /** |
| 9 | 7 | * MCP ability: returns the current Imagify account status and quota data. |
| 10 | 8 | * |
| 11 | 9 | * Registers itself with the WP Abilities API under the slug |
| @@ -88,22 +86,8 @@ | ||
| 88 | 86 | * @return bool True when the current user has the Imagify `manage` capability. |
| 89 | 87 | */ |
| 90 | 88 | protected function has_permission(): bool { |
| 91 | 89 | return imagify_get_context( 'wp' )->current_user_can( 'manage' ); |
| 92 | - } | |
| 93 | - | |
| 94 | - /** | |
| 95 | - * Fetch the initialized User instance. | |
| 96 | - * | |
| 97 | - * Extracted into a protected method so that unit tests can override | |
| 98 | - * this call without needing to bootstrap the full Imagify API layer. | |
| 99 | - * | |
| 100 | - * @return User | |
| 101 | - */ | |
| 102 | - protected function fetch_user(): User { | |
| 103 | - $user = new User(); | |
| 104 | - $user->init_user(); | |
| 105 | - return $user; | |
| 106 | 90 | } |
| 107 | 91 | |
| 108 | 92 | /** |
| 109 | 93 | * Execute the ability: return the current Imagify account status. |