Thank you this is done now
add_filter( 'woocommerce_cart_item_price', function ( $price, $item, $item_key ) {
if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
$parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
return '';
}
}
return $price;
}, 999, 3 );
add_filter( 'woocommerce_cart_item_subtotal', function ( $price, $item, $item_key ) {
if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
$parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
return '';
}
}
return $price;
}, 999, 3 );
add_filter( 'woocommerce_cart_item_quantity', function ( $price, $item_key, $item ) {
if ( isset( WC()->cart->cart_contents[$item_key]['wooco_parent_key'] ) ) {
$parent_key = WC()->cart->cart_contents[$item_key]['wooco_parent_key'];
if ( isset( WC()->cart->cart_contents[$parent_key] ) || array_search( $parent_key, array_column( WC()->cart->cart_contents, 'wooco_key', 'key' ) ) ) {
return '';
}
}
return $price;
}, 999, 3 );
just amazing what Fiverr can do for you at $5