WPCommerce MultiDomain WPCommerce MultiDomain
  • 0
    • No products in the cart.
    • Home
    • Features
    • Pricing
    • Documentation
    • FAQ
    • Articles
    • Contact
    • My account
    WPCommerce MultiDomain WPCommerce MultiDomain
  • 0
    • No products in the cart.
    • Home
    • Features
    • Pricing
    • Documentation
    • FAQ
    • Articles
    • Contact
    • My account
    WPCommerce MultiDomain

    Documentation

    woomd/disable_global_cart

    Name: woomd/disable_global_cart
    Type: Filter
    Arguments: $is_disabled

    The filter is being used to disable the Global Cart functionality. The Global Cart works as a unique cart for all shops in the MultiSite Network, a product pushed to the cart will be show on all other shops too.

    
        add_filter( 'woomd/disable_global_cart',     'WooMD_Disable_GlobalCart', 10, 2 );
        function  WooMD_Disable_GlobalCart ( $status, $_blog_id = '' )
            {
                
                return TRUE;   
            }
    
    

    The code should be placed inside a php file on wp-content/mu-plugins folder.

    The Global Cart can be disabled for individual sites, the following code can be used, in this example, the 3 and 4 are the sites ID that will be disabled:

    
    
        define ( 'WooMD_GC_Ignore_Sites', array( 3, 4 ) );
           
        
        add_filter( 'woomd/disable_global_cart',     'WooMD_Disable_GlobalCart');
        function  WooMD_Disable_GlobalCart ( $status, $_blog_id = '' )
            {
                
                global $blog_id;
                
                if ( empty ( $_blog_id ) )
                    $_blog_id    =   $blog_id;
                
                if (  in_array( $_blog_id, WooMD_GC_Ignore_Sites ))
                    return TRUE;   
                    
                return $status;
                
            }
    
    

    Leave a Reply Cancel reply

    Recent Posts

    • How Customers Shop Across Multiple Domains March 19, 2026
    • Selecting the Checkout Type option – Single Checkout / Each Store February 25, 2025
    • Easy Multilingual and Multi-Currency WooCommerce Shop November 18, 2023

    Social Links

    @2026. All Rights Reserved

    Terms & Conditions | Privacy Policy

    Latest Articles

    • How Customers Shop Across Multiple Domains
      WooMultiDomain is built for stores that want one WooCommerce product list to serve multiple domains...
    • Selecting the Checkout Type option – Single Checkout / Each Store
      The WordPress WPCommerce Multi-Domain plugin includes powerful global shopping cart functionality, allowing customers to add...
    • Easy Multilingual and Multi-Currency WooCommerce Shop
      Using the WooCommerce Multi Domain, managing the WooCommerce Products has never been easier. Multiple Domains...
    • Why use WP Multi Domain for WooCommerce with default WordPress instance over MultiSite environment
      Creating a centralised network of shops isn’t a straightforward implementation. That requires a lot of...

    Nsp Code Follow

    Nsp-Code official Twitter account

    nspcode
    nspcode Nsp Code @nspcode ·
    27 Feb

    Software License for WooCommerce - Implement Discount Pricing for Expiring Products

    #woocommerce #woosoftwarelicense #softarelicense

    Reply on Twitter 2027313354339913789 Retweet on Twitter 2027313354339913789 Like on Twitter 2027313354339913789 Twitter 2027313354339913789
    nspcode Nsp Code @nspcode ·
    19 Jan

    How to Synchronize Product Brands Across the Shops in the network
    #WooCommerce #GlobalCart

    Reply on Twitter 2013262939466191241 Retweet on Twitter 2013262939466191241 Like on Twitter 2013262939466191241 Twitter 2013262939466191241
    Load More