• Resolved jamesbriggs

    (@jamesbriggs)


    Just a general question. Which files get overridden – or when files get. overridden, which ones are they? ( I understand not every update overrides some files).

    Are they just template files, or css and other asset files too?

    Furthermore, am I able to make copies of woocommerce css files in my child theme and edit there or does that only work for templates? I am currently editing some templates using this method, but for example editing the general css at the moment I am going direct to the file. Is that fine?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @jamesbriggs,

    Updating a plugin will overwrite all of the plugins files. This is one of the reasons WooCommerce allows for it’s PHP template files to be overridden from within a child theme.

    With regards to CSS. Instead of editing CSS from directly within the WooCommerce plugin files, you should create your own custom CSS files within a child theme to override the styles of WooCommerce.

    I’d recommend using Google Chrome Developer Tools. You can right click anywhere on your webpage to select ‘Inspect Element’, the HTML and CSS properties show up right in your browser. You can then write your own custom CSS to overide those.

    I hope this helps.

    Thread Starter jamesbriggs

    (@jamesbriggs)

    @stuartduff many thanks for your reply.

    So are you suggesting I just add custom css to a blank style sheet and link to this?
    From my understanding only template files can be directly overwritten through the child theme, and these css files are not templates..
    Or will just putting these customisations in the style.css file in my child theme do the trick?

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @jamesbriggs,

    Template overrides are only for PHP template files as per this documentation.

    https://docs.woocommerce.com/document/template-structure/

    For CSS it’s best to create a new blank file in a child theme and use the existing WooCommerce CSS files as a point of reference as per this documentation.

    https://docs.woocommerce.com/document/css-structure/

    Thread Starter jamesbriggs

    (@jamesbriggs)

    @stuartduff

    Much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Update file overrides’ is closed to new replies.