storefront 去掉cart price

Storefront theme
************** Remove cart display from under header  ***************

Add this to your site’s CSS:

/* Remove shopping cart from header */

.woocommerce-active .site-header .site-header-cart {
display: none!important;
}

If you use a child theme, you can just add it to the bottom of our styles.css file, otherwise use it in customizer, there should be a place to add additional CSS in there. If none of these apply, use this: Simple CSS

**************  How to Hide/remove/disable Add to cart button in WooCommerce?  *********************

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );


********** remove single product price 



add_filter('woocommerce_is_purchasable', 'my_woocommerce_is_purchasable', 10, 2);
function my_woocommerce_is_purchasable($is_purchasable, $product) {
        return ($product->id == whatever_mambo_jambo_id_you_want ? false : $is_purchasable);

}

短代码:

[featured_products per_page="3" columns="3"]



猜你喜欢

转载自blog.csdn.net/xtjie/article/details/79846902