woogc/sync/on_post_vars
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 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 ‘woogc/sync/on_post_vars’ 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 action => woocommerce_add_to_cart_variable_rc
Sample Usage
add_filter('woogc/sync/on_post_vars', 'woogc_sync_on_post_vars');
function woogc_sync_on_post_vars( $PostVars )
{
$PostVars[] = 'action=add_to_cart';
$PostVars[] = 'action=woocommerce_add_to_cart_variable_rc';
$PostVars[] = 'action=product_remove';
return $PostVars ;
}
Related Posts
This newly implemented functionality helps with displaying WooCommerce Products across shops, in the network, under your WordPress MultiSite environment. Promote specific products, types of merchandise, category of goods, so boosting overall network sales. The new function is available as a Woocommerce Product Shortcode and is easy to implement. Any section of a site can include the shortcode to output the required products. The woocommerce shortcode is usable within the default WordPress editor ( classic ) or any advanced layout composer like Elementor, Divi, Visual Builder etc.
WooCommerce Tax area provides...
Name: woogc/get_cart_from_session/validate_hash
Type:Â Filter
Arguments:Â $force_validation, $values
When reconstructing...
Incredibly flexible, the WooCommerce...
On the Synchronization screen...
Name: woogc/network_orders/get_orders/mysql_query/GROUP_BY
Type:Â Filter
Arguments:Â $mysql_query, $blog_id
The filter...
Name: woogc/network_orders/get_orders/mysql_query/JOIN
Type:Â Filter
Arguments:Â $mysql_query, $blog_id
The filter...
Name: woogc/network_orders/get_orders/mysql_query/SELECT
Type:Â Filter
Arguments:Â $mysql_query, $blog_id
The filter...
Deprecated notice: The recent...
The WooCommerce Global Cart...