Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @dimned ,

    Thanks for your response.

    +1 to please integrate this into the GUI form editor.

    Regards,
    Aaron

    Hi @motopress,

    Could you tell me which file should I put the code in? I tried to add the following code in wp-content/plugins/getwid/includes/functions.php, but I got an error message “There was an error trying to send your message. Please try again later.” when I tested the contact form. Thanks.

    //Fires authenticated Ajax actions for logged-in users.
    add_action( 'wp_ajax_getwid_send_mail', 'mytheme_wp_ajax_getwid_send_mail' );
    
    //Fires non-authenticated Ajax actions for logged-out users.
    add_action( 'wp_ajax_nopriv_getwid_send_mail', 'mytheme_wp_ajax_getwid_send_mail' );
    
    //Filter admin_email once.
    function mytheme_wp_ajax_getwid_send_mail(){
        add_filter('option_admin_email', 'mytheme_getwid_change_admin_email');
    }
    
    //Set new recipient address
    function mytheme_getwid_change_admin_email( $value ) {
        return "[email protected]";
    }
    • This reply was modified 5 years, 12 months ago by aluo.
Viewing 2 replies - 1 through 2 (of 2 total)