Support » Fixing WordPress » Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’

  • Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ in /home/bizveinc/public_html/wp-content/themes/astra/header.php on line 2

    How to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • HTTP_USER_AGENT constant does not exist in your server that’s why you get undefined error. Your theme should be checking if that constant is set before using it on the code. This should remove the error.

    The error looks coming from a theme. Did you try contacting the theme author regarding this error? Perhaps you can try updating to the latest theme version at your test site to see if its fixed already.

    Just a note that you should not edit the parent theme files directly as this would be overwritten by theme updates. You should be using a child theme. Here is the link to WordPress documentation: https://developer.wordpress.org/themes/advanced-topics/child-themes/

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    This indicates a coding error in your theme.

    I recommend asking at https://wordpress.org/support/plugin/woocommerce/#new-post so the theme’s developers and support community can help you with this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’’ is closed to new replies.