• Resolved bambino82

    (@bambino82)


    Hi,

    You mention: To disable cart fragments on specific posts/pages (using their ID), refer to below defined constant: define(‘DISABLE_CART_FRAGMENTS’, ‘123,456,789’);

    Do i put that in the wp-config file? or where do i place that?

    Can you make an option so we can disable it from within the wp-admin? that will be more easy.

    Also does your plugin also remove the woocommerce styles and scripts like seen at
    webnots.com ?

    /** Disable All WooCommerce  Styles and Scripts Except Shop Pages*/
    add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 );
    function dequeue_woocommerce_styles_scripts() {
    if ( function_exists( 'is_woocommerce' ) ) {
    if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
    # Styles
    wp_dequeue_style( 'woocommerce-general' );
    wp_dequeue_style( 'woocommerce-layout' );
    wp_dequeue_style( 'woocommerce-smallscreen' );
    wp_dequeue_style( 'woocommerce_frontend_styles' );
    wp_dequeue_style( 'woocommerce_fancybox_styles' );
    wp_dequeue_style( 'woocommerce_chosen_styles' );
    wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
    # Scripts
    wp_dequeue_script( 'wc_price_slider' );
    wp_dequeue_script( 'wc-single-product' );
    wp_dequeue_script( 'wc-add-to-cart' );
    wp_dequeue_script( 'wc-cart-fragments' );
    wp_dequeue_script( 'wc-checkout' );
    wp_dequeue_script( 'wc-add-to-cart-variation' );
    wp_dequeue_script( 'wc-single-product' );
    wp_dequeue_script( 'wc-cart' );
    wp_dequeue_script( 'wc-chosen' );
    wp_dequeue_script( 'woocommerce' );
    wp_dequeue_script( 'prettyPhoto' );
    wp_dequeue_script( 'prettyPhoto-init' );
    wp_dequeue_script( 'jquery-blockui' );
    wp_dequeue_script( 'jquery-placeholder' );
    wp_dequeue_script( 'fancybox' );
    wp_dequeue_script( 'jqueryui' );
    }
    }
    }

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    • This topic was modified 6 years, 4 months ago by bdbrown.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor littlebizzy

    (@littlebizzy)

    Defined constants belong in wp-config.php correct.

    Nope, we will never add a bulky settings panel.

    This plugin only disables cart fragmentation, but we have another plugin to disable WooCommerce stylesheets.

    Thread Starter bambino82

    (@bambino82)

    Also when activated i still see a lot of woocommerce js files. Doesnt your plugin remove those?

    For example:

    woocommerce.min.js
    country-select.min.js
    address-i18n.min.js
    checkout.min.js

    all loaded from: woocommerce/assets/js/frontend/

    Plugin Contributor littlebizzy

    (@littlebizzy)

    You seem to confuse the purpose of various plugins.

    As stated already:

    This plugin only disables cart fragmentation, but we have another plugin to disable WooCommerce stylesheets.

    Neither plugin is meant to alter other JS included with WooCommerce.

    Thread Starter bambino82

    (@bambino82)

    ok, thanks for clearing that up, and thanks for the fast reply. You asked if i could delete the other topic, but can you please reply to that question as well, meaning to explain what the “selective disable” exactly does.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘disable selected’ is closed to new replies.