• Hi Everyone,

    I have implemented a redirect after job submission. Basically I wanted to redirect the user after successfully submitting a a Job to their Dashboard page. Which works fine.
    But since the redirect has been implemented I am no longer getting the nice
    “Your changes have been saved. View →” type of Message confirmation

    Here is the code for the redirect

    add_filter( 'submit_job_steps', 'replace_done_with_redirect' );
    
    function replace_done_with_redirect( $steps ) {
    	$steps['done'] = array(
    	'priority' => 30,
    	'handler' => function() {
    		if ( wp_redirect( job_manager_get_permalink( 'job_dashboard' ) ) ) {
    			exit;
    		}
    	});
    
    	return $steps;
    }
    

    Is there anything I can do to make the default success message (ie: “Your job is now posted”) to showon the redirected page? I my case the dashboard page.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Cena (a11n)

    (@cena)

    Hi @lehelm,

    In general, we can’t help with custom code like this.

    However, we do have a snippet for redirecting after job submission:

    
    add_action( 'resume_manager_resume_submitted', 'wpjmres_final_redirect', 99);
    
    function wpjmres_final_redirect(){
      wp_redirect('https://DOMAIN.COM');
      exit();
    }
    

    What happens if you use that instead?

    Best,

    Thread Starter Lehel Mátyus

    (@lehelm)

    Hi @cena

    Thank you very much, your response is much appreciated.
    The redirect works, my question was about how can I throw a Job Manager Message the ones that show up like this

    <div class="job-manager-message">Your changes have been saved. <a href="https://website.com/job/company-2-test-24/">View →</a></div>
    

    on top of a page. To indicate to the end-user that their changes have been saved.

    Is there function I can use in Job Manager that I can use?

    Thanks,
    Lehel

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @lehelm ,

    Sorry for the delay in responding!

    Normally, we can’t really help with custom code like this, but in my testing I can see our own snippet is also losing the job-manager-message. I’ve opened an internal request for our developers to take a look, so we can update the snippet if possible. It also doesn’t seem to work at all with WC Paid Listings if you have to buy a package, since you’re forced to the cart first.

    Anyway, I know this isn’t immediately helpful to you, but thanks for bringing this up, and hopefully we can get the snippet fixed up soon.

    Best,
    Cena

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Confirmation Message job-manager-message on redirected page’ is closed to new replies.