Dmitry
asked 5 years ago

Hello! Bought DW Question & Answer Pro – WordPress Plugin at the Envato Market.
Thank you!

1 Answers
DominicStaff
answered 5 years ago

If you want to remove the email, you need to change in the core of the plugin. please backup the files edited before update the latest version. This is solution for you: Open the plugins/dw-question-answer/inc/Handle.php file. Find and remove the following code: Line 50:
if ( !is_user_logged_in() && ( empty( $_POST['user-email'] ) || !is_email( sanitize_email( $_POST['user-email'] ) ) ) ) {
dwqa_add_notice( __( 'Missing email information', 'dw-question-answer' ), 'error' );
}
line 219: 
if ( ! isset( $_POST['email'] ) || ! sanitize_email( $_POST['email'] ) ) {
dwqa_add_notice( __( 'Missing email information', 'dw-question-answer' ), 'error', true );
}

line 321:

if ( empty( $_POST['_dwqa_anonymous_email'] ) || !is_email( sanitize_email( $_POST['_dwqa_anonymous_email'] ) ) ) {
dwqa_add_notice( __( 'Missing email information', 'dw-question-answer' ), 'error' );
return false;
}
Then open the plugins/dw-question-answer-pro/templates/style/default/question-submit-form.php file. and remove the following code: 
<p>
<label for="_dwqa_anonymous_email"><?php _e( 'Your Email', 'dw-question-answer' ) ?></label>
<?php $email = isset( $_POST['_dwqa_anonymous_email'] ) ? sanitize_email( $_POST['_dwqa_anonymous_email'] ) : ''; ?>
<input type="email" class="" name="_dwqa_anonymous_email" value="<?php echo $email ?>" >
</p>

Dominic Staff
replied 5 years ago

Also, you should use private question/answer to send your info.

Powered by DW Question & Answer Pro