WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. TimoVeld
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/woocommerce/

  2. jameskoster
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic