irene
asked 2 years ago

Hello, When a user sends his question, no success message appears, however if the user makes a mistake, such as for example he forgets to put his email, an error message is displayed. I would like a message to appear when the user successfully submits their question. How can I do it?

2 Answers
DominicStaff
answered 2 years ago

You can open the wp-content/plugins/dw-question-answer-pro/inc/Handle.php file and find the line 559.
Replace the following code:

    exit( wp_safe_redirect( get_permalink( $new_question ) ) );

With the new code:

dwqa_add_notice( __( 'Your question is Submitted.', 'dwqa' ), 'success' );

We will discuss about this option in the next version.

irene
answered 2 years ago

Hello! Thanks for your help, I’m trying that but it doesn’t work, I tried in differents browsers and deleting cache, but the succes message doesn’t appear. 
I also tried to “change” the text of an error message just to confirm my changes is being updated, and this error message i modified works, so my changes are being updated but the code you give doesn’t work in my site. 
You can see the code here, the changes are in the line 547 
https://piensoferal.es/wp-content/uploads/2021/11/Captura-de-pantalla-2021-11-17-a-las-11.07.29.png
¿I’m doing something wrong?
Thank you for your help!!! 
 

Dominic Staff
replied 2 years ago

I can not check your screenshot. Please send me the username & password of your site for further checking.

irene
replied 2 years ago

sorry for the delay in my response, someone mistakenly deleted the image from my library, here is a new url link in which to check the code, line 547.

https://piensoferal.es/wp-content/uploads/2021/12/Captura-de-pantalla-2021-12-02-a-las-12.19.31.png

As you can see, I have followed the steps you have told me but when I ask a question, the question is correctly registered but the user does not receive a success message.

Am I doing something wrong?

thank you!!!

Powered by DW Question & Answer Pro