diff --git a/includes/functions-ur-core.php b/includes/functions-ur-core.php index 21abe1dd4..6d5568431 100644 --- a/includes/functions-ur-core.php +++ b/includes/functions-ur-core.php @@ -1745,41 +1745,6 @@ function ur_falls_in_date_range( $target_date, $start_date = null, $end_date = n } } -/** - * Get count of form visits from Form ID. - * - * @param int $form_id Form ID. - */ -function user_registration_get_form_visits( $form_id ) { - $count_key = 'ur_form_views_count'; - $count = get_post_meta( $form_id, $count_key, true ); - if ( '' === $count ) { - delete_post_meta( $form_id, $count_key ); - add_post_meta( $form_id, $count_key, '0' ); - return '0'; - } - return $count; -} - -/** - * Set count of form visits from Form ID. - * - * @param int $form_id Form ID. - */ -function user_registration_set_form_visits( $form_id ) { - $count_key = 'ur_form_views_count'; - $count = get_post_meta( $form_id, $count_key, true ); - - if ( '' === $count ) { - $count = 1; - delete_post_meta( $form_id, $count_key ); - add_post_meta( $form_id, $count_key, $count ); - } else { - $count++; - update_post_meta( $form_id, $count_key, $count ); - } -} - /** * Get Post Content By Form ID. * diff --git a/templates/form-registration.php b/templates/form-registration.php index 6f81ed72b..b63d3c669 100644 --- a/templates/form-registration.php +++ b/templates/form-registration.php @@ -33,7 +33,6 @@ $custom_class = ur_get_form_setting_by_key( $form_id, 'user_registration_form_custom_class', '' ); $redirect_url = ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_redirect_options', '' ); $template_class = ''; -user_registration_set_form_visits( $form_id ); if ( 'Bordered' === $form_template ) { $template_class = 'ur-frontend-form--bordered';