• Hi There,

    On our website we make use of affiliate products.
    Because you work with hidden fields for the add_to_cart event, these get added as query params to the external URL. (gtm4wp_id, gtm4wp_name, etc.)

    This specific affiliate redirects to sef urls based on these query params and because of that the url is not working.

    Is there a way to prevent these hidden fields from showing up on affiliate products?

    For now I added the below condition to gtm4wp_woocommerce_single_add_to_cart_tracking() in woocommerce.php
    if ($product->is_type(‘external’)){
    return;
    }

    Is there a more elegant way for me to achieve this in a way I do not have to edit plugin code directly?

    The page I need help with: [log in to see the link]

  • The topic ‘Affiliate product query params’ is closed to new replies.