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.
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.
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.
Hello,
Function defined if WooCommerce isnβt installed. and update latest code.
Excellent – great job!
Thank you for a really great plugin.