• Resolved martong91

    (@martong91)


    Hello,

    I would like to ask for help to hook the upsell template from ‘woocommerce_after_single_product_summary’ to ‘woocommerce_single_product_summary’ as I would like it to appear above the description but under the product’s picture.
    I tried this code but didn’t work.
    */
    remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_upsell_display’, 15 );
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_upsell_display’, 61 );

    the only thing it did was to remove the upsell bar completely from the single product site
    I also attach a picture to illustrate my thought. https://imgur.com/a/vlELGgW

    First I asked on the theme developer’s forum but the author said the theme doesn’t modify WooCommerce template
    sorry for my english, and thanks in advance

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Stef

    (@serafinnyc)

    Your snippet probably isn’t working because your computer is changing the ‘ to a different ‘ and where did you get 61?

    What are you exactly wanting to do? Move the up-sell somewhere?

    Thread Starter martong91

    (@martong91)

    Yes I want to move the upsell under the product gallery but top of the description of the product.

    Stef

    (@serafinnyc)

    It essentially is under the product gallery. Are you wanting to remove the gallery all together? That’s one of those areas that’s hard to hook unless you move the gallery.

    Thread Starter martong91

    (@martong91)

    No, my issue that it’s not under the product gallery but under the product description.

    Stef

    (@serafinnyc)

    Well, I’m not sure what you’ve done to that theme as it is. You could try this which is after the ATC

    add_action( 'woocommerce_after_add_to_cart_form', 'ssd_woocommerce_output_upsells', 5 );
    function ssd_woocommerce_output_upsells() {
    woocommerce_upsell_display( 4,4 ); 
    }
    Thread Starter martong91

    (@martong91)

    Ok thanks will try tomorrow

    Plugin Support Riaan K.

    (@riaanknoetze)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Upsell hook’ is closed to new replies.