• Resolved harf4ng

    (@harf4ng)


    Hi,
    I’m using latest version of WordPress, woocommerce and Avada theme.
    I have created a child theme for my Avada theme which is called “Avada-Child-Theme” and is the active theme.
    I have copied price.php file into the structure:
    wp-content/themes/Avada-Child-Theme/woocommerce/single-product/price.php

    But even with that, if I modify price.php, the display does not change on the website, it always use the file that is in:
    wp-content/plugins/woocommerce/templates/single-product/price.php

    Any idea why?

    Also, is it normal the woocommerce folder is inside the plugins folder? I also have a woocommerce folder inside my main Avada theme folder, but there is no price.php file there.

    Thanks

    • This topic was modified 7 years, 1 month ago by harf4ng.
Viewing 1 replies (of 1 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    See this guide on how to override templates: https://docs.woocommerce.com/document/template-structure/

    The woocommerce folder in your plugins directory is the actual WooCommerce plugin. The woocommerce folder in your theme are some overridden template files.

    The following structure is the correct way to override this template:

    `
    wp-content/themes/child-theme-name/woocommerce/single-product/price.php
    `

    If changes you make there aren’t showing – then either you aren’t looking for the changes in the right place, your page is cached, or your theme / another plugin is doing something special and preventing the override.

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to override price.php file’ is closed to new replies.