0
votes

i`m trying add parameter to url .The problem is that i have a loop when i redirect page to the same one.

        $courseURL = '/course/course-name';
    if (!$payment) {
        $courseURL .= '?payment=false';
     } 
wp_redirect ($courseURL );

Maybe you can suggest another way to do it. Thanks