<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Actions / Filters &#8211; WPCommerce MultiDomain</title>
	<atom:link href="https://woomultidomain.com/documentation_category/actions-filters/feed/" rel="self" type="application/rss+xml" />
	<link>https://woomultidomain.com</link>
	<description>A single WooCommerce Product list, across multiple domains</description>
	<lastBuildDate>Tue, 26 Apr 2022 10:33:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>woomd/ignore_options</title>
		<link>https://woomultidomain.com/documentation/woomd-ignore_options/</link>
					<comments>https://woomultidomain.com/documentation/woomd-ignore_options/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 27 Sep 2021 13:18:32 +0000</pubDate>
				<guid isPermaLink="false">https://woomultidomain.com/?post_type=documentation&#038;p=5657</guid>

					<description><![CDATA[Name: woomd/ignore_options Type: Filter Arguments: $ignore_options The filter is being used to add specific options to the ignore list, to be allowed for save separately, within each of the domains. The following example adds to the ignore the theme_settings option name: A global match can be achieved for an option using the % symbol, the following example..]]></description>
										<content:encoded><![CDATA[<p><strong>Name:</strong> woomd/ignore_options<br />
<strong>Type:</strong> Filter<br />
<strong>Arguments:</strong> $ignore_options</p>
<p>The filter is being used to add specific options to the ignore list, to be allowed for save separately, within each of the domains.<br />
The following example adds to the ignore the <strong>theme_settings</strong> option name:</p>
<pre class="brush: php; title: ; notranslate">

    add_filter( 'woomd/ignore_options',     'WooMD_ignore_options');
    function  WooMD_ignore_options ( $ignore_options )
        {
            $ignore_options&#x5B;] = 'theme_settings';
             
            return $ignore_options;   
        }

</pre>
<p>A global match can be achieved for an option using the % symbol, the following example will match all options like theme_color, theme_style, theme_layout etc:</p>
<pre class="brush: php; title: ; notranslate">

    add_filter( 'woomd/ignore_options',     'WooMD_ignore_options');
    function  WooMD_ignore_options ( $ignore_options )
        {
            $ignore_options&#x5B;] = 'theme_%';
             
            return $ignore_options;   
        }

</pre>
<p>The code should be placed inside a php file on<strong> wp-content/mu-plugins/</strong> folder.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://woomultidomain.com/documentation/woomd-ignore_options/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>woomd/get_checkout_url</title>
		<link>https://woomultidomain.com/documentation/woomd-get_checkout_url/</link>
					<comments>https://woomultidomain.com/documentation/woomd-get_checkout_url/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 21 Sep 2021 16:27:35 +0000</pubDate>
				<guid isPermaLink="false">http://woomultidomain.com/?post_type=documentation&#038;p=5544</guid>

					<description><![CDATA[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..]]></description>
										<content:encoded><![CDATA[<p><strong>Name:</strong> woomd/get_checkout_url<br />
<strong>Type:</strong> Filter<br />
<strong>Arguments:</strong> $checkout_url</p>
<p>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.<br />
The following code change the checkout url to shop default when blog_id is 4:</p>
<pre class="brush: php; title: ; notranslate">

    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;   
        }

</pre>
<p>The code should be placed inside a php file on wp-content/mu-plugins folder or theme functions.php.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://woomultidomain.com/documentation/woomd-get_checkout_url/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>woomd/sync/on_post_vars</title>
		<link>https://woomultidomain.com/documentation/woomd-sync-on_post_vars/</link>
					<comments>https://woomultidomain.com/documentation/woomd-sync-on_post_vars/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 21 Sep 2021 16:25:23 +0000</pubDate>
				<guid isPermaLink="false">http://woomultidomain.com/?post_type=documentation&#038;p=5543</guid>

					<description><![CDATA[Name: woomd/sync/on_post_vars Type: Filter Arguments: $PostVars Filter being used to acknowledge the plugin engine to proceed with synchronization, usually following a custom AJAX call which is not being recognized as a WooCommerce default. (e.g. wc-ajax=add_to_cart,  wc-ajax=get_refreshed_fragments) Certain plugins and themes use their own methods to handle the cart operations like add, remove.  To create a compatibility between..]]></description>
										<content:encoded><![CDATA[<p><strong>Name</strong>: woomd/sync/on_post_vars<br />
<strong>Type:</strong> Filter<br />
<strong>Arguments:</strong> $PostVars</p>
<p>Filter being used to acknowledge the plugin engine to proceed with synchronization, usually following a custom AJAX call which is not being recognized as a WooCommerce default. (e.g. wc-ajax=add_to_cart,  wc-ajax=get_refreshed_fragments)</p>
<p>Certain plugins and themes use their own methods to handle the cart operations like add, remove.  To create a compatibility between such code and the WooCommerce Global Cart plugin, at least a POST parameter must be registered through the &#8216;woomd/sync/on_post_vars&#8217; filter, recommended to be a unique field. The following sample code, inform the plugin engine to trigger a synchronization procedure right after a POST call has completed and included a field <strong>action </strong>=&gt;<strong> woocommerce_add_to_cart_variable_rc</strong></p>
<p>Sample Usage</p>
<pre class="brush: php; title: ; notranslate">
add_filter('woomd/sync/on_post_vars', 'woomd_sync_on_post_vars');
function woomd_sync_on_post_vars( $PostVars )
    {
        $PostVars&#x5B;] = 'action=add_to_cart';
        $PostVars&#x5B;] = 'action=woocommerce_add_to_cart_variable_rc';
        $PostVars&#x5B;] = 'action=product_remove';

        return $PostVars ;
    }
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://woomultidomain.com/documentation/woomd-sync-on_post_vars/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>woomd/disable_global_cart</title>
		<link>https://woomultidomain.com/documentation/woomd-disable_global_cart/</link>
					<comments>https://woomultidomain.com/documentation/woomd-disable_global_cart/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 21 Sep 2021 16:17:05 +0000</pubDate>
				<guid isPermaLink="false">http://woomultidomain.com/?post_type=documentation&#038;p=5542</guid>

					<description><![CDATA[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( &#039;woomd/disable_global_cart&#039;, &#039;WooMD_Disable_GlobalCart&#039;, 10, 2 ); function WooMD_Disable_GlobalCart ( $status, $_blog_id =..]]></description>
										<content:encoded><![CDATA[<p><strong>Name:</strong> woomd/disable_global_cart<br />
<strong>Type:</strong> Filter<br />
<strong>Arguments:</strong> $is_disabled</p>
<p>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.</p>
<pre class="brush: php; title: ; notranslate">

    add_filter( &#039;woomd/disable_global_cart&#039;,     &#039;WooMD_Disable_GlobalCart&#039;, 10, 2 );
    function  WooMD_Disable_GlobalCart ( $status, $_blog_id = &#039;&#039; )
        {
            
            return TRUE;   
        }

</pre>
<p>The code should be placed inside a php file on wp-content/mu-plugins folder.</p>
<p>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:</p>
<pre class="brush: php; title: ; notranslate">


    define ( &#039;WooMD_GC_Ignore_Sites&#039;, array( 3, 4 ) );
       
    
    add_filter( &#039;woomd/disable_global_cart&#039;,     &#039;WooMD_Disable_GlobalCart&#039;);
    function  WooMD_Disable_GlobalCart ( $status, $_blog_id = &#039;&#039; )
        {
            
            global $blog_id;
            
            if ( empty ( $_blog_id ) )
                $_blog_id    =   $blog_id;
            
            if (  in_array( $_blog_id, WooMD_GC_Ignore_Sites ))
                return TRUE;   
                
            return $status;
            
        }

</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://woomultidomain.com/documentation/woomd-disable_global_cart/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
