How to remove duplicates from product column (Custom field) in woocommerce
I have two fields one is name/title of the product and second one is a custom field stock number (stock_number) all the products have name/title and stock number I am only showing stock number in the front end and there are duplicates in stock number I want to show the stock number only once and hide the rest which are duplicates. below is an example
a = 1 b = 2 c = 2 d = 3
in the above example, b and c have the same value I want to display them only once either b or c FYI I am currently displaying the values on the right-hand side.
found this answer but it does not make sense. ACF: post query, hide duplicate values