mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-30 11:42:22 +08:00
8 lines
286 B
Text
8 lines
286 B
Text
add_filter( 'woocommerce_get_price_html', function( $price ) {
|
|
if ( ! is_user_logged_in() ) {
|
|
return '';
|
|
}
|
|
return $price; // Return original price
|
|
} );
|
|
add_filter( 'woocommerce_cart_item_price', '__return_false' );
|
|
add_filter( 'woocommerce_cart_item_subtotal', '__return_false' );
|