chore: Remove debug logs from shipping toggle
Cleaned up all debug logging now that toggle works perfectly.
Removed:
- Backend error_log statements
- Frontend console.log statements
- Kept only essential code
Result: Clean, production-ready code ✅
This commit is contained in:
@@ -38,18 +38,7 @@ export default function ShippingPage() {
|
||||
// Fetch shipping zones from WooCommerce
|
||||
const { data: zones = [], isLoading, refetch } = useQuery({
|
||||
queryKey: ['shipping-zones'],
|
||||
queryFn: async () => {
|
||||
const data = await api.get('/settings/shipping/zones');
|
||||
console.log('[Shipping] Fetched zones:', data);
|
||||
// Log each zone's methods
|
||||
data.forEach((zone: any) => {
|
||||
console.log(`[Shipping] Zone "${zone.name}" (ID: ${zone.id}):`, zone.rates);
|
||||
zone.rates?.forEach((rate: any) => {
|
||||
console.log(` - ${rate.name}: enabled=${rate.enabled}`);
|
||||
});
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryFn: () => api.get('/settings/shipping/zones'),
|
||||
staleTime: 5 * 60 * 1000, // 5 minutes
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user