get_field for a widget value returns null ACF
We can’t get the whole picture unless we see exactly where your code has been added and called, but I suggest to check every variables value of this line of code $is_mobile_enabled = get_field(‘mobile_enable’, ‘widget_’ . $args[‘widget_id’]); Check the value of $args[‘widget_id’], as if it may be empty. Also, it’s better to use error_logs instead … Read more