feat: Tax settings + unified addon guide + Biteship spec
## 1. Created BITESHIP_ADDON_SPEC.md ✅ - Complete plugin specification - Database schema, API endpoints - WooCommerce integration - React components - Implementation timeline ## 2. Merged Addon Documentation ✅ Created ADDON_DEVELOPMENT_GUIDE.md (single source of truth): - Merged ADDON_INJECTION_GUIDE.md + ADDON_HOOK_SYSTEM.md - Two addon types: Route Injection + Hook System - Clear examples for each type - Best practices and troubleshooting - Deleted old documents ## 3. Tax Settings ✅ Frontend (admin-spa/src/routes/Settings/Tax.tsx): - Enable/disable tax calculation toggle - Display standard/reduced/zero tax rates - Show tax options (prices include tax, based on, display) - Link to WooCommerce for advanced config - Clean, simple UI Backend (includes/Api/TaxController.php): - GET /settings/tax - Fetch tax settings - POST /settings/tax/toggle - Enable/disable taxes - Fetches rates from woocommerce_tax_rates table - Clears WooCommerce cache on update ## 4. Advanced Local Pickup - TODO Will be simple: Admin adds multiple pickup locations ## Key Decisions: ✅ Hook system = No hardcoding, zero coupling ✅ Tax settings = Simple toggle + view, advanced in WC ✅ Single addon guide = One source of truth Next: Advanced Local Pickup locations
This commit is contained in:
@@ -10,6 +10,7 @@ use WooNooW\Api\AuthController;
|
||||
use WooNooW\API\PaymentsController;
|
||||
use WooNooW\API\StoreController;
|
||||
use WooNooW\Api\ShippingController;
|
||||
use WooNooW\Api\TaxController;
|
||||
|
||||
class Routes {
|
||||
public static function init() {
|
||||
@@ -54,6 +55,10 @@ class Routes {
|
||||
// Shipping controller
|
||||
$shipping_controller = new ShippingController();
|
||||
$shipping_controller->register_routes();
|
||||
|
||||
// Tax controller
|
||||
$tax_controller = new TaxController();
|
||||
$tax_controller->register_routes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user