Gravity Forms only creates refferal with direct Link

Posted in

Hi George!

I can´t answer t the old thred anymore: https://www.itthinx.com/topic/gravity-forms-only-creates-refferal-with-direct-link/

Do You have any update for me?

Many thanks!

Cheers
Rudi

5 Responses to Gravity Forms only creates refferal with direct Link

  1. George June 16, 2017 at 12:51 pm #

    Hi Rudolf,

    Yes exactly in the functions.php file of your active theme.
    If there is any other action needed upon an update, i will let you know.

    Cheers,
    George

  2. Rudolf June 15, 2017 at 5:12 pm #

    Hi George!

    And the snippet in the functions.php file? No further action necessary when updates are comng?

    Many thanks once again!

    Cheers
    Rudi

  3. George June 15, 2017 at 4:41 pm #

    Hi Rudolf,

    Thank you for your patience.
    Any upcoming update will include this patch or something similar.

    Cheers,
    George

  4. Rudolf June 15, 2017 at 3:35 pm #

    Hi George,

    many thanks! It works now! Great! 🙂

    Do I have to take care for something if there comes an update?

    Cheers
    Rudi

  5. George June 15, 2017 at 11:59 am #

    Hi Rudolf,

    I’ve created a patch for your case until the plugin is updated. I sent it to you by email. The file should be placed under /public_html/your_wordpress_folder/wp-content/plugins/affiliates-pro/lib/core/. Once you upload the file wp-init.php in that path, it will ask you to replace the old file. You should click yes to replace it with my patched wp-init.php file.

    After that, you should place the following snippet in your functions.php file of your active theme.

    add_filter( 'affiliates_parse_request_sitecookiepath', 'gt_affiliates_parse_request_sitecookiepath' );
    function gt_affiliates_parse_request_sitecookiepath( $site_cookie_path ) {
    $site_cookie_path = SITECOOKIEPATH;
    if ( get_option( 'siteurl' ) !== get_option( 'home' ) ) {
    $site_cookie_path = '/';
    }
    return $site_cookie_path;
    }

    This issue occurs when the WordPress installation is in a subdirectory and results in the cookies being wrongly stored. This happens because a WordPress installation in a subdirectory redirects only the frontpage to the domain without the subdirectory whereas the wp-admin is only accessible through the full path. ie The site is accessible through http://www.example.com but wp-admin is accessible only through http://www.example.com/subdirectory/wp-admin.

    For any questions, you can reply here.

    Cheers,
    George

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share