Home Forums WoodMart support forum WooCommerce Hooks not Working?

WooCommerce Hooks not Working?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #635754

    Drewseph
    Participant

    So, I’m trying to display a “Backorder” message on a product page where it’s set to Backorder. I’ve tried several different hooks:
    add_filter( ‘woocommerce_after_single_product_summary’, ‘display_backorder_message’, 999 );
    + after meta end, meta start, after add to cart

    and none work. I tried turning off product page template so that it displays just the standard product page and I also tried having it show when the template is toggled on… and nothing.

    This seems to be a Woodmart issue because any other WordPress theme (especially the one I came from), the exact same hook+code worked. Please see content.

    Like I said, this exact same code worked on my previous theme and not for some reason, it doesnt display when using Woodmart.

    #635755

    Drewseph
    Participant

    I switched it to this code now and it worked fine on the standard product page template… but when I switched to override the product page with a gutenberg template, the code doesn’t display now. So, how can I get this to work in the template? I thought that even if you use the hook, the code should display.

    #636013

    Luke Nielsen
    Keymaster

    Hello,

    If you use Layouts for the product page, use the “WooCommerce Hook ” element to show some custom content – https://prnt.sc/z1d17RQ8Gwoe

    Let me know the result.

    Kind Regards

    #636015

    Drewseph
    Participant

    What you’re showing me is Elementor though. Im using Gutenberg.

    #636020

    Drewseph
    Participant

    Never mind, you do. Ill see

    #636025

    Luke Nielsen
    Keymaster

    Hello,

    The same element persists in any builder that we support.

    Let me know the result. Thank you for your time.

    Kind Regards

Viewing 6 posts - 1 through 6 (of 6 total)