woocommerce offtopic - Hide price and add to cart button on product page only

I’m using Datafeedr to show price comparison sets on a product page. The price comparison table opens up dynamically onc

I’m using Datafeedr to show price comparison sets on a product page. The price comparison table opens up dynamically once the page is loaded. But because I want people to follow the link to the cheapest store that offers that product I really have no use for each imported product to show it’s own price. That price could be higher than the prices that are shown in the comparison table and the link of the button would then send the visitor to the wrong store. I have a plugin that turns of the prices and add to cart buttons, but it also turns of the prices on the category pages. And I do want the prices to show there because on the category pages people can filter the prices or set a price range. Can someone tell me with which snippets I can leave the prices in the category pages, but hide them on the single product pages and also how to hide the add to cart button? Thanks very much!

I’m using Datafeedr to show price comparison sets on a product page. The price comparison table opens up dynamically once the page is loaded. But because I want people to follow the link to the cheapest store that offers that product I really have no use for each imported product to show it’s own price. That price could be higher than the prices that are shown in the comparison table and the link of the button would then send the visitor to the wrong store. I have a plugin that turns of the prices and add to cart buttons, but it also turns of the prices on the category pages. And I do want the prices to show there because on the category pages people can filter the prices or set a price range. Can someone tell me with which snippets I can leave the prices in the category pages, but hide them on the single product pages and also how to hide the add to cart button? Thanks very much!

Share Improve this question asked Sep 16, 2019 at 17:23 Robert MacnielRobert Macniel 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

This will remove price and add to cart button on the product page Only

// Remove Price from the product page
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );

// Remove Add to cart form from the product page
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745153057a4613951.html

相关推荐

  • woocommerce offtopic - Hide price and add to cart button on product page only

    I’m using Datafeedr to show price comparison sets on a product page. The price comparison table opens up dynamically onc

    2小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信