Closed ramyakrishnai closed 4 weeks ago
@ramyakrishnai - Just following up here. @BrianHenryIE mentioned that the init
hook feels like the wrong hook, and admin_init
feels more correct, given it automatically only applies in the backend context. I agree, but the issue is that the admin_menu
hook fires before the admin_init
hook (see https://developer.wordpress.org/apis/hooks/action-reference/). There doesn't seem to be a better hook that only applies to the admin area, so the solution you presented here is probably the best course of action.
Changing admin_init hook to init as it is not firing the promotions tab in side menu
Proposed changes
Type of Change
Video
Checklist
Further comments