Your cart is currently empty!
Gravity Forms only creates refferal with direct Link
—
by
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
Posted in Affiliates Pro
Comments
5 responses to “Gravity Forms only creates refferal with direct Link”
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
Hi George!
And the snippet in the functions.php file? No further action necessary when updates are comng?
Many thanks once again!
Cheers
Rudi
Hi Rudolf,
Thank you for your patience.
Any upcoming update will include this patch or something similar.
Cheers,
George
Hi George,
many thanks! It works now! Great! 🙂
Do I have to take care for something if there comes an update?
Cheers
Rudi
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