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.

    Leave a Reply Cancel reply

    Recent Posts

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

    Social Links

    @2022. All Rights Reserved

    Terms & Conditions | Privacy Policy

    Latest Articles

    • 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...
    • Selecting the Checkout Type option – Single Checkout / Each Store
      The WordPress WPCommerce Multi-Domain includes the global shopping cart functionality which allows a customer to...

    Nsp Code Follow

    Nsp-Code official Twitter account

    Avatar
    Avatar Nsp Code @nspcode ·
    17 Nov

    WooComerce Global Cart - Synchronize WooCommerce Products across the WordPress MultiSite shops #WordPress #WooCommerce #WPGlobalCart https://wpglobalcart.com/documentation/synchronize-woocommerce-products-across-the-wordpress-multisite-shops/

    Reply on Twitter 1593199043337146371 Retweet on Twitter 1593199043337146371 2 Like on Twitter 1593199043337146371 Twitter 1593199043337146371
    Avatar Nsp Code @nspcode ·
    15 Nov

    WP Hide Security Scan – Easily diagnose your site security problems and solutions.
    #WordPress #wphide #Security https://wp-hide.com/security-scan-easily-diagnose-your-site-security-problems-and-solutions/

    Reply on Twitter 1592474077998252032 Retweet on Twitter 1592474077998252032 1 Like on Twitter 1592474077998252032 Twitter 1592474077998252032
    Load More
    We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok