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
Name: woogc/single_checkout/split_order/order_created
Type:Â Action
Arguments:Â $new_order
The `woogc/single_checkout/split_order/order_created` action...
The WordPress WooCommerce Global...
By default, on Product...
Name: woogc/ps/synchronize_product/child_product
Type:Â Filter
Arguments:
(object)$child_product
(array)$main_product_data
(int)$origin_product_blog_ID
This filter...
The WooCommerce Global Cart...
The Global Cart feature...
In the ever-evolving landscape of e-commerce, where seamless customer experiences are the cornerstone of success, WooCommerce Global Cart is now supporting the new WooCommerce Cart Blocks and Checkout Blocks, as powerful allies for merchants seeking to elevate their checkout processes. This groundbreaking integration seamlessly blends the benefits of Global Cart with the enhanced functionality of the new blocks, propelling businesses towards a paradigm shift in their online shopping journeys. Starting WooCommerce version 8.3 the Cart Blocks and Checkout Blocks are now the default checkout flow for new installations.
Name: woogc/ps/interfaces/sync_to_shop
Type:Â Filter
Arguments:Â $status, $remote_blog_id, $post
The...
Name: woogc/ps/synchronize_product/completed
Type:Â Filter
Arguments: $child_product_ID, $main_product_ID,...