Answer the question
In order to leave comments, you need to log in
Is there a plugin in WordPress that fixes referrals for a partner when filling out contact details?
Good afternoon!
We need a functional that would record requests for a partner using his link.
That is, not selling goods and not registering, but filling out a form.
As a result, there should be a table containing the data:
Partner, Date/time of the application, Application data (Name, E-mail, phone, etc.).
At the moment, I have not found this in all the options I have looked at.
Please tell me the solution.
Answer the question
In order to leave comments, you need to log in
Your task is not universal, but the implementation is quite simple Add your variable
to the arrayquery_vars
add_filter( 'query_vars', 'add_query_vars' );
function add_query_vars( $qvars ) {
$qvars[] = 'partner';
return $qvars;
}
get_query_var()
if ( $query_var = get_query_var( 'partner' ) ) {
# code...
}
add_query_arg()
$url = add_query_arg( ['partner' => $user_id], home_url( '/' ) );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question