| @@ -1,8 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Better_Payment\Lite; |
| 4 | 4 | |
| 5 | +use Better_Payment\Lite\API\AdminAPI; | |
| 6 | +use Better_Payment\Lite\API\UserAPI; | |
| 7 | + | |
| 5 | 8 | /** |
| 6 | 9 | * Exit if accessed directly |
| 7 | 10 | */ |
| 8 | 11 | if (!defined('ABSPATH')) { |
| @@ -10,9 +13,9 @@ | ||
| 10 | 13 | } |
| 11 | 14 | |
| 12 | 15 | /** |
| 13 | 16 | * API Class |
| 14 | - * | |
| 17 | + * | |
| 15 | 18 | * @since 0.0.1 |
| 16 | 19 | */ |
| 17 | 20 | class API extends Controller { |
| 18 | 21 | |
| @@ -17,13 +20,16 @@ | ||
| 17 | 20 | class API extends Controller { |
| 18 | 21 | |
| 19 | 22 | /** |
| 20 | 23 | * Initialize the class |
| 21 | - * | |
| 24 | + * | |
| 22 | 25 | * @since 0.0.1 |
| 23 | 26 | */ |
| 24 | 27 | public function __construct() { |
| 25 | 28 | add_action( 'rest_api_init', [ $this, 'register_api' ] ); |
| 29 | + | |
| 30 | + new AdminAPI(); | |
| 31 | + new UserAPI(); | |
| 26 | 32 | } |
| 27 | 33 | |
| 28 | 34 | /** |
| 29 | 35 | * Register the API |