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/get_checkout_url

    Name: woomd/get_checkout_url
    Type: Filter
    Arguments: $checkout_url

    The filter is being used to change the $checkout_url for specific shops. As default this is being controlled through admin settings but can be adjusted to particular shops if need.
    The following code change the checkout url to shop default when blog_id is 4:

    
        add_filter( 'woomd/get_checkout_url',     'WooMD_get_checkout_url');
        function  WooMD_get_checkout_url ( $checkout_url )
            {
                global $blog_id;
    
                if( $blog_id == 4 )
                    {
                        $_checkout_url = wc_get_page_permalink( 'checkout' );
                        if ( $_checkout_url ) 
                            {
                                // Force SSL if needed
                                if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) 
                                    {
                                        $checkout_url = str_replace( 'http:', 'https:', $checkout_url );
                                    }
                            }    
                    }
                 
                return $checkout_url;   
            }
    
    

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

    2 replies on “woomd/get_checkout_url”

    • Paolo
      August 11, 2023 at 1:30 pm
      reply to Paolo

      Quick question before buying :
      Can we choose whether the redirection to the global checkout takes place at the level of the shopping cart or the payment page?

    • admin
      August 12, 2023 at 6:00 am
      reply to admin

      Hi,
      Yes, you can use a conditional (e.g. url check ) to identify the current location and redirect accordingly to your requirements.

      Thanks

    Leave a Reply to admin Cancel reply

    Recent Posts

    • Selecting the Checkout Type option – Single Checkout / Each Store February 25, 2025
    • Easy Multilingual and Multi-Currency WooCommerce Shop November 18, 2023
    • Why use WP Multi Domain for WooCommerce with default WordPress instance over MultiSite environment May 9, 2022

    Social Links

    @2026. All Rights Reserved

    Terms & Conditions | Privacy Policy

    Latest Articles

    • 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 ·
    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
    nspcode Nsp Code @nspcode ·
    12 Jan

    WooCommerce Global Cart for Single Site:
    Cart Split Explained, separate Orders with using a Unified Checkout

    https://single-site.wpglobalcart.com/cart-split-explained-separate-orders-with-using-a-unified-checkout/

    #WooCommerce #WordPress #WPGlobalCart

    Reply on Twitter 2010717998613434774 Retweet on Twitter 2010717998613434774 Like on Twitter 2010717998613434774 Twitter 2010717998613434774
    Load More