Created
October 2, 2015 05:38
-
-
Save kasparsd/26d679bd0852ffc7fc91 to your computer and use it in GitHub Desktop.
Disable form submissions storage for a form ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wpcf7_before_send_mail', function( $cf7 ) { | |
// Disable form submission for form ID 123 | |
if ( 123 == $cf7->id() ) { | |
remove_action( 'wpcf7_before_send_mail', array( cf7_storage::instance(), 'storage_capture' ) ); | |
} | |
}, 5, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment