• Resolved rpwp1

    (@rpwp1)


    Hi

    I updated my website to WooCommerce 3.3, and since then, the custom code relating to these hooks no longer function:

    woocommerce_before_main_content
    woocommerce_after_main_content

    Have deactivated all plugins and tried using Twenty Seventeen and Storefront themes; in all cases the same issue occurs. Have run debug mode and no errors are happening, also no errors in PHP log.

    Using WP Rollback, I can see the hooks stop working from 3.3.0 onwards (i.e. 3.2.x all run fine).

    I’m using my own developed theme based on Underscores; all WC functionality works fine other than this.

    If you know what’s happening or what can be done to fix, that’d be great. Will stay on WC 3.2 in the meantime.

    Thanks for your help!

    Robert

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rpwp1

    (@rpwp1)

    For anyone interested… Solved it. It’s to do with the Underscores theme. From WC 3.3, you need to explicitly declare WC theme compatibility in order to override templates.

    More info here: https://github.com/Automattic/_s/issues/1257

    Declare WC compatibility: https://github.com/woocommerce/woocommerce/wiki/Declaring-WooCommerce-support-in-themes

    • This reply was modified 6 years, 9 months ago by rpwp1.

    Still not working.

    WooCommerce is working in a strange way.

    “archive-product.php” cannot be overwritten, and the title markup in it, isn’t even the one that is getting rendered in the frontend.

    “woocommerce_before_main_content” hook is not working either. My theme always had WooCommerce declaration in it, and this hook still don’t work.

    Very strange. This is issues that has been mentioned multiple times in multiple threads, and they still didn’t fix it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WC 3.3.x – woocommerce_before_main_content no longer working’ is closed to new replies.