<?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>Code Example &#8211; WooCommerce Global Cart &#8211; Single Site</title>
	<atom:link href="https://single-site.wpglobalcart.com/documentation_tag/code-example/feed/" rel="self" type="application/rss+xml" />
	<link>https://single-site.wpglobalcart.com</link>
	<description></description>
	<lastBuildDate>Tue, 19 Sep 2023 15:30:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>woogc/sync/on_post_vars</title>
		<link>https://single-site.wpglobalcart.com/documentation/woogc-sync-on_post_vars/</link>
					<comments>https://single-site.wpglobalcart.com/documentation/woogc-sync-on_post_vars/#respond</comments>
		
		<dc:creator><![CDATA[admin-woogc]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 15:30:06 +0000</pubDate>
				<guid isPermaLink="false">https://single-site.wpglobalcart.com/?post_type=documentation&#038;p=14112</guid>

					<description><![CDATA[Name: woogc/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...]]></description>
										<content:encoded><![CDATA[<p><strong>Name</strong>: woogc/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;woogc/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('woogc/sync/on_post_vars', 'woogc_sync_on_post_vars');
function woogc_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://single-site.wpglobalcart.com/documentation/woogc-sync-on_post_vars/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>woogc/disable_global_cart</title>
		<link>https://single-site.wpglobalcart.com/documentation/woogc-disable_global_cart/</link>
					<comments>https://single-site.wpglobalcart.com/documentation/woogc-disable_global_cart/#respond</comments>
		
		<dc:creator><![CDATA[admin-woogc]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 15:25:16 +0000</pubDate>
				<guid isPermaLink="false">https://single-site.wpglobalcart.com/?post_type=documentation&#038;p=14111</guid>

					<description><![CDATA[Name: woogc/disable_global_cart Type: Filter Arguments: $is_disabled The filter is being used to disable the Global Cart functionality. add_filter( 'woogc/disable_global_cart', 'WooGC_Disable_GlobalCart', 10, 2 ); function WooGC_Disable_GlobalCart ( $status, $_blog_id = '' ) { return TRUE; } The code should be placed inside a php file on wp-content/mu-plugins folder.]]></description>
										<content:encoded><![CDATA[<p><strong>Name:</strong> woogc/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. </p>
<pre class="brush: php; title: ; notranslate">

    add_filter( 'woogc/disable_global_cart',     'WooGC_Disable_GlobalCart', 10, 2 );
    function  WooGC_Disable_GlobalCart ( $status, $_blog_id = '' )
        {
            
            return TRUE;   
        }

</pre>
<p>The code should be placed inside a php file on wp-content/mu-plugins folder.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://single-site.wpglobalcart.com/documentation/woogc-disable_global_cart/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
