Woocommerce not using woocommerce.css

I’m adding woocommerce to a custom theme that I have inherited from the previous designer. Everything has installed correctly. I’ve added the following code into my functions.php.

/* Woocommerce functions */
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);

add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);

function my_theme_wrapper_start() {
  echo '
<section id="body">';
}
 
function my_theme_wrapper_end() {
  echo '</section>
 
';
}

I’ve loaded the css here (and also tried hardcoding into header.php).

function additional_custom_styles() {
   	/*Enqueue The Styles*/
   
	wp_enqueue_style( 'woocommerce css', get_template_directory_uri() . '/woocommerce/assets/css/woocommerce.css' );
}
add_action( 'wp_enqueue_scripts', 'additional_custom_styles' );

When my shop loads, even though woocommerce.css is loaded in the header, the style all comes from main.css. (see attached image). Any ideas where I’m going wrong?

Thanks for your help,

Graeme

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.