Created
May 9, 2014 17:06
-
-
Save ksemel/20f4dd6464520726e191 to your computer and use it in GitHub Desktop.
Swap out the default WooCommerce stylesheets for your own
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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