• Resolved streamworksaudio

    (@streamworksaudio)


    Tonight I was toying around with a sandbox setup drafting out some ideas for some custom templates (I used overriding template files in our custom theme) and in doing so I was thinking about the classes that WooCommerce uses in it’s own templates. I was thinking of basically creating new templates from the ground up and was wondering if these classes are needed by WooCommerce for any programming reasons such as jQuery (i.e not just for design & layout).

    I did discover that the stripe plugin does require the class ‘checkout’ to be present on the form-checkout.php template (without it the input fields do not render correctly). This is what got me actually thinking about this.

    So, would it be safe to build templates that omit most (if not all) WooCommerce classes? Would this break any intended behaviour?

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

    Great question!

    You actually discovered the key here – many plugins rely on the default classes for their WooCommerce integrations. Because of this, I wouldn’t recommend omitting the default WooCommerce classes. It’s almost impossible to predict what intended behavior might be broken by removing these classes.

    For more information / recommendations on theme development, I’d recommend taking a look at the WooCommerce Theme Developer Handbook.

    Let us know if we can help answer any other questions on this!

    Thread Starter streamworksaudio

    (@streamworksaudio)

    Thanks @jlundie

    This is what I suspected ??

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Classes used in template… safe to remove?’ is closed to new replies.