WooCommerce - excelling eCommerce
[resolved] Clean way to disable hooks? (3 posts)

  1. TimoVeld
    Posted 2 years ago #

    What is the clean way to disable hooks?
    Just commenting out the lines in the woocommerce-hooks.php works for me but isn't compatible with future updates.

    Is there a cleaner way to override the hook file? Just as how the template files can be overridden?


  2. jameskoster
    Plugin Author

    Posted 2 years ago #

    If you want to unhook something use remove_action(). E.G.

    remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );

  3. TimoVeld
    Posted 2 years ago #

    That was exactly what I was looking for, thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic