Hide product SKU to guest customers
Saturday, 07 September 2019
In some cases it is possible that you need to hide the identifier (SKU) of the products in your e-commerce catalog to guest customers and want to display it only if a customer is registered and logged in.
To do this, edit functions.php file that you find in your site’s FTP space in:
and insert this code:
It is advisable not to edit the theme files directly, but to use a child theme.
For more information on child themes, please read: WordPress Official guide on Child Themes