I'm doing some work for a client and using wordpress / woocommerce, they asked me to move the categories to be located directly under the product name on a single product page which I have done, but they don't want it to print "categories: category 1, category 2 etc..." they would like the "categories:" removed and it to just actually lists the names of the categories without the label.
Normally this would be easy enough but I cant find the PHP anywhere that generates the divs that are in. Its with <div class="post_in">
which is nested in <div class="product_meta">
.
We are using "The Retailer" theme from theme forest if that makes a difference. You can see an example of what im talking about at http://www.sophieferreira.com/?product=down-the-rabbit-hole-onyx-print
My clean solution to the problem of overriding meta.php (replicable for any other script hookable)
Copy meta.php from woocommerce plugin
To your theme folder
Then in functions.php just remove and add the action this way:
Add again the same action but using a different second parameter (the name of the replacing function to be evaluated)
And finally add the replacing function
From now on you can safely change your html/php inside content-single-product-meta.php and override the default, without actually editing the original woocommerce php, so that if you need to upgrade the plugin you won't risk to lose your modifications.
I hope this helps.
Are you using the most current version of WooCommerce? If so, look in your plugins folder and navigate to "woocommerce -> templates -> single-product -> meta.php". Look on line 27 and you should see at least one location where this is being created. Try to edit that line and see if it works for you.
Keep in mind, anytime you are editing the WooCommerce template files you should move them into your theme folder. This way you will still be able to update WooCommerce without overwriting your edits. You can edit these files in an upgrade safe way through overrides. Simply copy it into a directory within your theme named /woocommerce, keeping the same file structure except you don't include the
templates
folder. So to override the meta.php file the structure inside of theme folder would be: woocommerce -> single-product -> meta.php