/** * Block form submissions based on IP address * * @link https://wpforms.com/developers/how-to-block-ip-addresses-from-completing-your-form/ */ function wpf_ip_block( $fields, $entry, $form_data ) { // Get the current users IP address $ip_address = wpforms_get_ip(); // List out the IP addresses separated by a comma $blocked_ips = array( '185.185.49.227', ); // Check if the current user IP address is a blocked IP if ( in_array( $ip_address, $blocked_ips ) ) { // Block form submission and print error wpforms()->process->errors[ $form_data[ 'id' ] ] [ 'footer' ] = esc_html__( 'Your IP address has been blocked. Please contact the site administrator for further assistance.', 'text-domain' ); } } add_action( 'wpforms_process', 'wpf_ip_block', 10, 3 );

Laat je inspireren

Dakkapellen die je hart veroveren.

Laat ons je droomdakkapel realiseren

Laat je droom van een ruimere woning uitkomen. Vraag vandaag nog een gratis offerte aan voor een dakkapel op maat.