• Resolved typicalboygenius

    (@typicalboygenius)


    I’ve modified meta.php and placed it in my child theme (/public_html/wp-content/themes/CHILDTHEME/woocommerce), but it doesn’t work. I’ve also tried placing the modified meta.php within a fully parallel structure (/public_html/wp-content/themes/CHILDTHEME/woocommerce/templates/single-product), but that also doesn’t work. I know my modifications to the file work, because they implement just fine when I copy them directly to the plugin folder. So any ideas how I might get the child theme version to work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @typicalboygenius ,

    Both paths you tried are incorrect. WooCommerce overrides need the same folder structure as the plugin, with the /templates/ folder removed:

    Plugin file:
    wp-content/plugins/woocommerce/templates/single-product/meta.php

    Child theme override:
    wp-content/themes/CHILDTHEME/woocommerce/single-product/meta.php

    So move your file into a “single-product” folder inside “woocommerce” (no “templates” folder, and not directly in woocommerce/).

    After that:
    1. Make sure the child theme is the active theme.
    2. Check WooCommerce > Status > System status > Templates. It should list the override and show whether it is outdated.
    3. Clear any page/object cache and reload the product page.

    Note: this applies to classic themes. If you use a block theme, the product page is built from Site Editor templates instead.

    Thread Starter typicalboygenius

    (@typicalboygenius)

    Thank you, Bhavik! This worked perfectly — and I appreciate your quick reply!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.