• Resolved ashebashthecash

    (@ashebashthecash)


    Good day! Love the plugin, thank you!

    I’m trying to use the Add_Action hook listed in the help section to redirect after the review is submitted. I know I’m doing this wrong as I’m not a coder. I’m hoping you can help. Here is what I tried. I’m placing this in code snippets. It just stalls and the success message never shows and the page never redirects. I want the action handler to be when the submit button is clicked.

    add_action(‘site-reviews/review/created’, function ($review, $command) {
    $wp_safe_redirect(‘https://example.com’);}
    , 10, 2);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    If you need to redirect the page after a review is submitted, you can do this by adding an entry to the Custom Fields metabox: Add redirect_to as the Name and the URL as the Value.

    See also the FAQ Help page:

    Thread Starter ashebashthecash

    (@ashebashthecash)

    Thanks. That worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Action Hook’ is closed to new replies.