• Resolved cmsnext

    (@cmsnext)


    I upgraded PHP to PHP 7.4 last week and since last week I am getting this error

    PHP Warning: Use of undefined constant is_shop - assumed 'is_shop' (this will throw an Error in a future version of PHP) in /public_html/wp-content/themes/abcdefg/functions.php on line 95

    I checked the code on that line and it is

    if (is_shop){

    So there we are checking if on Shop page then show a specific content.

    So will it create any issue? Or has the conditional code been changed to something else?

Viewing 1 replies (of 1 total)
  • Thread Starter cmsnext

    (@cmsnext)

    ok found the issue was a minor coding error

    if (is_shop){

    should be

    if (is_shop()){

    Then error is not displayed.

    • This reply was modified 3 years, 11 months ago by cmsnext. Reason: issue resolved
Viewing 1 replies (of 1 total)
  • The topic ‘is_shop PHP Warning: Use of undefined constant’ is closed to new replies.