• Resolved mrcairney

    (@mrcairney)


    Hi, this might seem a strange question, but I have 2 different sites that use the following (from the FAQ)

    add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_embedurl', 10, 3 );
    function salesforce_w2l_field_embedurl( $val, $field, $form ){
    // Target a specific field on all forms
    if( $field == 'adtracking__c' )
    $val = esc_url("https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
    return $val;

    However, at some point in the past year (I’m afraid I don’t know when) one site doesn’t parse the above into the field__c in SF, where are the other does. They have exactly the same function code and the same hidden field in their respective forms.

    The only thing I can think of is there’s a difference somewhere else that might be causing this. Anyone have an idea where that might be so I can investigate and test?

    • This topic was modified 4 months, 2 weeks ago by mrcairney.
Viewing 1 replies (of 1 total)
  • Plugin Author brilliantplugins

    (@brilliantplugins)

    Any server specific needs for esc_url?

    No this is a core WP function.

    Depending on the URL, you may need to use the raw version.

    The only thing I can think of is there’s a difference somewhere else that might be causing this. Anyone have an idea where that might be so I can investigate and test?

    I can’t think of anything.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.