Untitled
unknown
plain_text
2 years ago
1.0 kB
9
Indexable
add_filter( 'woocommerce_cart_item_price', 'b2bking_hide_prices_cart', 1000, 3 );
add_filter( 'woocommerce_cart_item_subtotal', 'b2bking_hide_prices_cart', 1000, 3 );
add_filter( 'woocommerce_cart_subtotal', 'b2bking_hide_prices_cart', 1000, 3 );
add_filter( 'woocommerce_cart_total', 'b2bking_hide_prices_cart', 1000, 3 );
add_filter( 'woocommerce_cart_total', 'b2bking_hide_prices_cart', 1000, 3 );
add_filter( 'woocommerce_get_price_html', 'b2bking_hide_prices_cart', 99999, 2 );
add_filter( 'woocommerce_variation_get_price_html', 'b2bking_hide_prices_cart', 99999, 2 );
function b2bking_hide_prices_cart( $price ) {
if (b2bking()->is_subaccount()){
return '';
}
return $price;
}
add_action('wp_head', function(){
if (b2bking()->is_subaccount()){
?>
<style type="text/css">
.woocommerce-Price-amount, .woocommerce-order-overview__total, .includes_tax, .tax_label, .cart-subtotal, .order-total, .product-price, .product-subtotal{
display: none !important;
}
</style>
<?php
}
});
Editor is loading...
Leave a Comment