The last line isn’t even necessary (the_field(‘price_per_kilo’, $product->$id ); //show price per kilo) as I put a shortcode below the price to put a prefix and a sufix with some CSS customization. It even works when the price is on sale !
The only thing is that the price calculated doesn’t appear on the back office in the price per kilo box but it’s no big deal as the most important thing is that it’s shown on the product page.
Thank you again Celestial, I owe you a pint !
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users