Skip to content

Instantly share code, notes, and snippets.

View chris-castillo-dev's full-sized avatar

Chris Castillo chris-castillo-dev

View GitHub Profile
@chris-castillo-dev
chris-castillo-dev / remove-woo-scripts.php
Created February 28, 2020 14:40
Remove Unnecessary WooCommerce Assets
/**
* This code snippet removes JavaScript and CSS files loaded from WooCommerce if they are not necessary.
*
* Please test this on a staging copy of your website before putting this into the functions.php of your live website.
*
* Author: Jan Koch
*/
add_action( 'wp_enqueue_scripts', 'my_remove_woo_assets', 99 );
function my_remove_woo_assets() {