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/sync/on_post_vars

    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 such code and the WooCommerce Global Cart plugin, at least a POST parameter must be registered through the ‘woomd/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('woomd/sync/on_post_vars', 'woomd_sync_on_post_vars');
    function woomd_sync_on_post_vars( $PostVars )
        {
            $PostVars[] = 'action=add_to_cart';
            $PostVars[] = 'action=woocommerce_add_to_cart_variable_rc';
            $PostVars[] = 'action=product_remove';
    
            return $PostVars ;
        }
    

    Leave a Reply Cancel reply

    Recent Posts

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

    Social Links

    @2025. All Rights Reserved

    Terms & Conditions | Privacy Policy

    Latest Articles

    • Selecting the Checkout Type option – Single Checkout / Each Store
      The WordPress WPCommerce Multi-Domain plugin includes powerful global shopping cart functionality, allowing customers to add...
    • 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...

    Nsp Code Follow

    Nsp-Code official Twitter account

    nspcode
    nspcode Nsp Code @nspcode ·
    4 Jan

    Check with the new Two-Factor Authentication (2FA) feature on WP Hide PRO to enhance your WordPress site's security. Protect your site with an extra layer of defense against unauthorized access.

    #WordPress #wphide #WebSecurity #Security

    https://wp-hide.com/documentation/2fa-two-factor-authentication/

    Reply on Twitter 1875455866557911200 Retweet on Twitter 1875455866557911200 Like on Twitter 1875455866557911200 Twitter 1875455866557911200
    nspcode Nsp Code @nspcode ·
    26 Nov

    White-label your plugins and theme using the PostProcessing



    @WordPress @WebSecurityNews @wphide @WordPlugins

    Reply on Twitter 1861441972491235735 Retweet on Twitter 1861441972491235735 Like on Twitter 1861441972491235735 Twitter 1861441972491235735
    Load More