• Resolved davemiddles

    (@davemiddles)


    I’ve experienced this many times now, where a snippet will deactivate due to a fatal error without notice, and it will fail to reactivate. I reactivate it manually and it works fine. Is there any way to force the plugin to reactivate snippets after this happens, or at least send me an email notification? Sometimes my website is broken for days or weeks at a time before I realize it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @davemiddles,

    No issues here.

    • Have you performed a plugin conflict test?
    • Have you checked the validity (i.e., code) of the snippets that are “self-deactivating”?
    • If you can share one of the code snippets that are “self-deactivating”, glad to take a look at it for errors.

    Cheers.

    Thread Starter davemiddles

    (@davemiddles)

    I’m not sure what exactly is triggering the deactivation, whether it’s a plugin or not. All the snippets I currently use seem to work under normal day-to-day conditions.

    I don’t possess the skill set required to assess the code, but here is an example of a snippet that gets deactivated once in a while. It removes the “lightbox” effect from images on product pages:

    add_filter('woocommerce_single_product_image_thumbnail_html','wc_remove_link_on_thumbnails' );
     
    function wc_remove_link_on_thumbnails( $html ) {
         return strip_tags( $html,'<img>' );
    }
    

    It’s not critical when snippets are deactivated, as long as I reactivate them promptly. That’s why an email notification (or an auto-reactivation) would be sufficient to solve the issue, if at all possible.

    Thanks for your help.

    Hey @davemiddles,

    Your code snippet (format) is acceptable. You may want to do the following:

    • Perform a plugin conflict test.
    • Perform a code snippet conflict test.
    • Review this topic for applicability and solution.
    • Export all of your code snippets to your desktop, make a backup of your site, delete the plugin (clean uninstall), clean your databases, reinstall the plugin, then import your code snippets.

    Beyond the above, can’t think of anything else.

    Best wishes!

    Thread Starter davemiddles

    (@davemiddles)

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Snippets keep deactivating without notice’ is closed to new replies.