Check If Contact Form 7 Plugin Is Running

To test if Contact Form 7 is running, we use the following code to see if the WPCF7_VERSION is defined. If the plugin is loaded, this will return with a value, which is TRUE.

<?php
if( defined( ‘WPCF7_VERSION’ )
{
// code block here
}
?>