Skip to content

Instantly share code, notes, and snippets.

@gregrickaby
Last active January 2, 2019 10:38
Show Gist options
  • Select an option

  • Save gregrickaby/2852142 to your computer and use it in GitHub Desktop.

Select an option

Save gregrickaby/2852142 to your computer and use it in GitHub Desktop.

Revisions

  1. gregrickaby revised this gist May 25, 2015. 2 changed files with 15 additions and 12 deletions.
    12 changes: 0 additions & 12 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,12 +0,0 @@
    add_action( 'init', 'child_manage_woocommerce_styles', 99 );
    define( 'WOOCOMMERCE_USE_CSS', false );
    /**
    * Remove all WooCommerce scripts and styles
    *
    * @author WP Smith
    * @since 1.0.0
    */
    function child_manage_woocommerce_styles() {
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
    remove_action( 'wp_enqueue_scripts', array( $GLOBALS['woocommerce'], 'frontend_scripts' ) );
    }
    15 changes: 15 additions & 0 deletions remove-all-woocommerce-scripts-styles.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    <?php
    //* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php

    /**
    * Remove all WooCommerce scripts and styles! Forever!
    *
    * @author WP Smith
    * @since 1.0.0
    */
    function grd_remove_woocommerce_styles_scripts() {
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
    remove_action( 'wp_enqueue_scripts', array( $GLOBALS['woocommerce'], 'frontend_scripts' ) );
    }
    define( 'WOOCOMMERCE_USE_CSS', false );
    add_action( 'init', 'grd_remove_woocommerce_styles_scripts', 99 );
  2. gregrickaby revised this gist Apr 22, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    add_action( 'init', 'child_manage_woo_styles', 99 );
    add_action( 'init', 'child_manage_woocommerce_styles', 99 );
    define( 'WOOCOMMERCE_USE_CSS', false );
    /**
    * Remove all WooCommerce scripts and styles
    *
    * @author WP Smith
    * @since 1.0.0
    */
    function child_manage_woo_styles() {
    function child_manage_woocommerce_styles() {
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
    remove_action( 'wp_enqueue_scripts', array( $GLOBALS['woocommerce'], 'frontend_scripts' ) );
    }
  3. gregrickaby revised this gist Jun 26, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion functions.php
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    add_action( 'init', 'child_manage_woo_styles', 99 );
    define( 'WOOCOMMERCE_USE_CS', false );
    define( 'WOOCOMMERCE_USE_CSS', false );
    /**
    * Remove all WooCommerce scripts and styles
    *
  4. gregrickaby created this gist Jun 1, 2012.
    12 changes: 12 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    add_action( 'init', 'child_manage_woo_styles', 99 );
    define( 'WOOCOMMERCE_USE_CS', false );
    /**
    * Remove all WooCommerce scripts and styles
    *
    * @author WP Smith
    * @since 1.0.0
    */
    function child_manage_woo_styles() {
    remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
    remove_action( 'wp_enqueue_scripts', array( $GLOBALS['woocommerce'], 'frontend_scripts' ) );
    }