fix: ShippingController extends WP_REST_Controller
Fixed fatal error in ShippingController. Issue: - ShippingController extended BaseController (does not exist) - Caused PHP fatal error: Class not found Fix: - Changed to extend WP_REST_Controller (WordPress standard) - Matches pattern used by PaymentsController and StoreController - Added proper PHPDoc header Result: ✅ API endpoint now works ✅ No more 500 errors ✅ Shipping zones load correctly
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Shipping REST API Controller
|
||||
*
|
||||
* Provides REST endpoints for shipping zones and methods management.
|
||||
*
|
||||
* @package WooNooW
|
||||
*/
|
||||
|
||||
namespace WooNooW\Api;
|
||||
|
||||
use WP_REST_Controller;
|
||||
use WP_REST_Request;
|
||||
use WP_REST_Response;
|
||||
use WC_Shipping_Zones;
|
||||
|
||||
class ShippingController extends BaseController {
|
||||
class ShippingController extends WP_REST_Controller {
|
||||
|
||||
protected $namespace = 'woonoow/v1';
|
||||
protected $rest_base = 'settings/shipping';
|
||||
|
||||
Reference in New Issue
Block a user