jetpack_contact_form_forget_ip_address

jetpack_contact_form_forget_ip_address

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.15.2

apply_filters('jetpack_contact_form_forget_ip_address') is found 3 times:

  • /jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-contact-form.php line 2083
    		 * @param string $ip_address IP address of the form submission.
    		 *
    		 * @since 0.33.0
    		 */
    		if ( apply_filters( 'jetpack_contact_form_forget_ip_address', false, $comment_author_ip ) ) {
    			$comment_author_ip = null;
    		}
    
    		$post_id       = 0;
    		$feedback_post = $response->save();
    		if ( $feedback_post instanceof WP_Post ) {
    
  • /jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-feedback.php line 847
    			return null;
    		}
    		// This filter allows site owners to disable IP address storage entirely as well as GeoIP lookups.
    		// This filter is documented in src/contact-form/class-contact-form-plugin.php
    		if ( apply_filters( 'jetpack_contact_form_forget_ip_address', false ) ) {
    			return null;
    		}
    
    		/**
    		 * Filter to get country code from IP address.
    		 *
    
  • /jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-feedback.php line 1227
    			$fields_to_serialize['fields'][] = $field->serialize();
    		}
    
    		// Check if the IP and country_code should be included.
    		if ( apply_filters( 'jetpack_contact_form_forget_ip_address', false, $this->ip_address ) ) {
    			$fields_to_serialize['ip']           = null;
    			$fields_to_serialize['country_code'] = null;
    		}
    
    		return addslashes( wp_json_encode( $fields_to_serialize ) );
    	}