Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2018 15:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
[WooCommerce Drip] This filter allows you to customize the subscriber custom fields sent to Drip. This is an example of sending the first and last names instead of a general full name:
add_filter( 'wcdrip_custom_fields', 'drip_add_first_last_fields', 10, 5 );
function drip_add_first_last_fields( $filters, $email, $lifetime_value, $products, $order ) {
unset( $filters['name'] );
$filters['first_name'] = $order->billing_first_name;
$filters['last_name'] = $order->billing_last_name;
return $filters;
Copy link

If I'm looking to grab an additional field that is a checkbox, how would I do that to pass along into Drip as a custom field?

I'm testing this along with the first_name and it's not storing the first_name either, so either this no longer works or I'm not doing something correctly.

Any thoughts/help would be appreciated, thank you in advance!

Copy link

Hi, Im using the filter wcdrip_custom_fields in order to send custom values to drip. But one thing that I noticed is that this only works if a returning customer has purchased a product from my site. But if the customer purchases something for the very first time the custom info is not sent to drip.

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment