• Resolved paullacey

    (@paullacey)


    Hi there just a heads up that 1.4 seems to break the front end of site I just updated it on. Reverting to 1.3 makes it work again.

    This site is PHP 7.4 BTW

    Cheers πŸ™‚

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Anil Ankola

    (@anilankola)

    Hi, @paullacey

    in 1.3 plugin version is fine but Custom Body Class not displayed in WooCommerce shop page and 1.4 plugin version display the Custom Body Class in WooCommerce shop and WP blog post page.

    Jeremy B. Shapiro

    (@jeremyshapiro)

    Hi, @anilankola , this is not resolved. This is a breaking change.

    The issue is that 1.4 calls is_shop() on line 43 of add-custom-body-class.php . That function isn’t defined if WooCommerce isn’t installed. You should first check that the function is defined with function_exists() i.e. function_exists('is_shop') .

    So you can change that line to be something like:

    if(function_exists('is_shop') && is_shop())

    To reproduce and test, just make sure that the site is NOT a shop. Like even a basic fresh WordPress install.

    kombimedia

    (@kombimedia)

    I’m seeing the same issue on a site where WC is not installed.

    When I try to roll back to an earlier version with the WP Rollback plugin I get this warning.

    It appears there are no version to select. This is likely due to the plugin author not using tags for their versions and only committing new releases to the repository trunk.

    I have disabled the plugin to bring the site back up.

    destinoexterior

    (@destinoexterior)

    Same here…

    Plugin Author Anil Ankola

    (@anilankola)

    Hello,

    Function defined if WooCommerce isn’t installed. and update latest code.

    Thread Starter paullacey

    (@paullacey)

    Excellent – great job!
    Thank you for a really great plugin.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘1.4 creates broken front end’ is closed to new replies.