Skip to content

Snippet: Remove Theme Styles from the WooCommerce Account Page

By default the Total theme loads 2 CSS files on the WooCommerce "My Account" page for the default design. If you are using a plugin to customize the design or want to customize it yourself from scratch you can use this code to remove the theme's CSS to make things easier and to trim down bloat.

// Remove the theme's CSS for the WooCommerce account page.
add_action( 'wp_enqueue_scripts', function() {
	if ( function_exists( 'is_account_page' ) && is_account_page() ) {
		wp_dequeue_style( 'wpex-woocommerce-account-page' );
		wp_dequeue_style( 'wpex-woocommerce-account-page-largescreen' );
	}
}, 100 );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top