[Support request] Remove link to product page from Woo hand-picked products block

Home Forums Support Remove link to product page from Woo hand-picked products block

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1344108
    jennifer

    [Edit: Added example page]

    I downloaded a plugin so that on the WooCommerce hand-picked products block, I’d be able to replace the add to cart button with a direct purchase link.

    The problem is that the product image still links to the product page.

    How can I remove this link?

    I tried adding the below code that I found to the functions file, but it doesn’t work. The code author says that if it doesn’t work, it could be because the hooks and/or priorities of the theme could be different. Could you please advise?

    if ( is_product() && is_product_category( array(‘nocartcat’) ) ) {
    remove_action( ‘woocommerce_before_shop_loop_item’, ‘woocommerce_template_loop_product_link_open’, 10 );
    remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_product_link_close’, 5 );
    }

    #1344354
    David
    Staff
    Customer Support

    Hi there,

    can you provide a link to your site?
    You can edit your original topic and use the Site URL field to share the link privately.

    #1344715
    jennifer

    Just added. Thanks.

    #1344738
    David
    Staff
    Customer Support

    That URL takes me to a 404 not found page ?

    #1344742
    jennifer

    Ah, sorry. It was set to private. Now it’s public, so you can access.

    #1344813
    Leo
    Staff
    Customer Support

    Does that code work if you are using a twenty series WP default themes?

    #1345951
    jennifer

    No, it does not.

    #1346178
    Leo
    Staff
    Customer Support

    That case please check with the plugin support again.

    If they can provide the code that works with the default wp themes, it should work with GP as well.

    #1346182
    jennifer

    The plugin is only meant to replace the “add to cart” link, and has nothing to do with the link from the product image, which I’m trying to remove.

    Are you still able to help?

    #1346195
    Leo
    Staff
    Customer Support

    Are you referring to the WooCommerce blocks on the test page?

    If so you’d need to check with their support unfortunately.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.