How to add custom filter to skip WooCommerce upsells based on CRM tags (ActiveCampaign, WP Fusion)?

The code below leverages the filter wc_1cu_offer_skip_custom_rule that we have in our One Click Upsells for WooCommerce plugin. It allows to build any additional custom logics to skip upsell and downsell offers based on other conditions (for example, 3rd-party data).

In the snippet below we have a code that integrates with WP Fusion (which connects your WordPress site to CRMs like ActiveCampaign, InfusionSoft and dozens of other systems).

How this code works:

  1. For each offer in the funnel we add related tags from ActiveCampaign into special “Offer Meta” field (divided by comma).
  2. After checkout, when our upsell funnel is executed, the code below pulls the tags for current offer from the “Offer Meta” field.
  3. And compares them against his ActiveCampaign profile via WP Fusion API wp_fusion()->user->has_tag()
  4. If customer has one of the specified tags, current offer is skipped.

We can help you build any kind of advanced upsell/downsell funnel logics similar to this one. Contact us here.