feat: Add Store Settings backend with full countries/timezones
✅ StoreSettingsProvider.php: - get_countries() - All WooCommerce countries - get_timezones() - All PHP timezones with UTC offsets - get_currencies() - All WooCommerce currencies with symbols - get_settings() - Current store settings - save_settings() - Save store settings ✅ StoreController.php: - GET /woonoow/v1/store/settings - POST /woonoow/v1/store/settings - GET /woonoow/v1/store/countries (200+ countries) - GET /woonoow/v1/store/timezones (400+ timezones) - GET /woonoow/v1/store/currencies (100+ currencies) - Response caching (1 hour for static data) 🔌 Integration: - Registered in Api/Routes.php - Permission checks (manage_woocommerce) - Error handling Next: Update Store.tsx to use real API
This commit is contained in:
@@ -8,6 +8,7 @@ use WooNooW\Api\OrdersController;
|
||||
use WooNooW\Api\AnalyticsController;
|
||||
use WooNooW\Api\AuthController;
|
||||
use WooNooW\API\PaymentsController;
|
||||
use WooNooW\API\StoreController;
|
||||
|
||||
class Routes {
|
||||
public static function init() {
|
||||
@@ -44,6 +45,10 @@ class Routes {
|
||||
// Payments controller
|
||||
$payments_controller = new PaymentsController();
|
||||
$payments_controller->register_routes();
|
||||
|
||||
// Store controller
|
||||
$store_controller = new StoreController();
|
||||
$store_controller->register_routes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user