LoicTheAztec's code did not work for me but was of great help in getting to a working solution. Here it is:
function get_product_data( $customer_data, $order ) {
foreach ( $order->get_items() as $item ) {
if ( 12496 === $item->get_product_id() && (($order->get_total() > '0') || wcs_order_contains_subscription( $order, 'parent' )) ) {
$customer_data['journey_sub_variation'] = $item['variation_id'];
}
}
return $customer_data;
}
add_filter( 'wpf_woocommerce_customer_data', 'get_product_data', 10, 2 );
Thanks again LoicTheAztec