wooCommerce menghapus kategori dari halaman produk
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
Filthy Falcon
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
if ( $cart_item['product_id'] == $your_product_id_here ) {
WC()->cart->remove_cart_item( $cart_item_key );
}
}