In AX 2012 R3 CU12, after disabling Trade > Warehouse and Transportation Management the Warehouse Management II license cannot be enabled in License information.

“You can not add this license code because the following required license codes have not been entered: Warehouse management I”

The fix was:
1. Kick out other users
2. Keep AOS online and AX open
3. Backup business data SQL database
4. Run this SQL on business database: DELETE SysConfig WHERE ConfigType IN (0, 1, 2)
5. Open License information in AX
6. Apply Microsoft AX license key, no DB sync
7. Apply any partner licenses, no DB sync
8. Check that Warehouse Management II is check-marked in the license information
8. DB sync
9. Axbuild.exe
10. Full CIL