I want to be able to use the product variables across all templates. Where should I store them? In Woocommerce templates folder? Example:
$productTitle = $product->get_name();
$productSlug = $product->get_slug();
I need to be able to echo these variables and I don't want to declare them more than once.
<h3> $productTitle </h3>
What's the better and cleaner way of doing it?