Skip to content

Instantly share code, notes, and snippets.

@ksemel
Created May 9, 2014 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksemel/20f4dd6464520726e191 to your computer and use it in GitHub Desktop.
Save ksemel/20f4dd6464520726e191 to your computer and use it in GitHub Desktop.
Swap out the default WooCommerce stylesheets for your own
<?php
add_action( 'init', 'woocommerce_overrides', 99 );
function woocommerce_overrides() {
add_filter( 'woocommerce_enqueue_styles', 'switch_to_theme_css', 10, 1 );
}
function switch_to_theme_css( $styles ) {
$styles[ 'woocommerce-layout' ][ 'src' ] = get_template_directory_uri()."/assets/css/woocommerce-layout.css";
$styles[ 'woocommerce-smallscreen' ][ 'src' ] = get_template_directory_uri()."/assets/css/woocommerce-smallscreen.css";
$styles[ 'woocommerce-general' ][ 'src' ] = get_template_directory_uri()."/assets/css/woocommerce.css";
return $styles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment