• How to change error message “Error occurred while adding product to Request a Quote list.”

    This error shows when variation(color or size) is not selected, I want it to say that “Select a variation before adding product to Request a Quote list.”

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can try the following code. Here I used for changing a message from the plugin WP Crontrol. I know that Woo has some custom error handling so I’m not sure this will work for you. The plugin Query Monitor helps to debug things (the do_action will show you the contents of the variables):

    add_action('wp_error_added', function ($code, $message, $data, $wp_error) {
    	do_action( 'qm/debug', ['Error', $code, $message ] );	
        if ( $code == 'crontrol_info' ) {
    		$wp_error->errors['crontrol_info'][0] = 'My modified message';
    	}
    }, 10, 4);

    The $code var is easier but you can try with the $message too.

    Plugin Support Alberto Ruggiero

    (@witcher83)

    Hello @digitaldecaders

    unfortunately that message is not customizable.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change error message’ is closed to new replies.