You can fix it through Session. try
function vv_process_profile_forms() {
session_start();
if ( isset( $_POST['action'] ) && $_POST['action'] == 'profile-form' ) {
if ( ! isset( $_SESSION['form-submit'] ) ) {
// form processing code here
$_SESSION['form-submit'] = 1;
$redirect_page = get_permalink( 586 );
wp_redirect( $redirect_page );
exit;
} else {
unset( $_SESSION['form-submit'] );
}
}
}
add_action( 'init','vv_process_profile_forms' );
Related Posts:
- Custom form action hook
- How to hook into user registration process Before user registers
- How to send data from a form created by a plugin to an external API?
- Using wp_editor tinyMCE in metabox cause form alert on leaving page
- Register form: add custom field BEFORE default fields
- Which action hook should I use to intercept a form upon submission?
- call php file from form and use wp functions
- prepopulate form from a hook within wordpress function.php file
- admin_post hook not working
- Is there a save_post hook for custom post types?
- Where is the right place to register/enqueue scripts & styles
- Difference between do_action and add_action
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Trigger custom action when setting button pressed
- Which hook if user profile information is updated?
- Are hooks called synchronously?
- Disable block from editor based on post type
- Difference between hooks Plugin_loaded and admin_int?
- Make W3 Total Cache “Empty All Caches” function purge varnish [closed]
- How to inject content after
- How to debug removal of rewrite rule flushing?
- function ‘wp_enable_block_templates’ not found
- Why does wp_enqueue_script ignore my ‘wp_head’ hook?
- How can I add a default description to uploaded files?
- Hook Widget to Woo Theme in functions.php
- Security around save_post hook
- How to pass arguments to add_action() [duplicate]
- action lifecycle
- How to use the post_updated hook before and after arguments
- Redirect users on specific post category or category page
- How get list all users who edited post?
- Stuck in redirect loop after using wp_login action
- I don’t understand why I shoud use lostpassword_url hook?
- How to get session token of current user in wp_login hook?
- How to update WordPress core or themes and still have my child theme hooks work
- Hook any php file into the wordpress api
- WP CLI Get all Enqueued Scripts and Styles
- Delay an action until current action is completed
- How to properly setup an activation hook
- How to remove scripts/style added to customize_controls_enqueue_scripts hook by current active theme
- Help to change the text for new website notification (wpmu_welcome_notification)
- How to remove query string from current page URL?
- How can I count post views of REST API calls and update them in an ACF field?
- Plugins rewrite rules the right way
- new_to_publish fires multiple times
- Strange behaviour with add_{$meta_type}_metadata | add_post_metadata filter
- Add nofollow to custom widget posts
- Change Password Confirmed Email Text
- How do I trigger a post update within a get_posts() foreach loop?
- How to change the default mail when admin approuved an user?
- How to modify how the_content outputs a link to an internal page
- read more, even if excerpt not trimmed
- How do I prevent term from being created on create_term hook?
- How to distinguish on hook profile_update user registering, user resetting password or user updating profile?
- Hook function prints output twice
- Hook priority in admin with custom plugin
- Embeding style into the header via the function.php
- ‘save_post’ hook not working in WP 3.5
- Change the Default Plugin page filter to Active intead of All
- How to run a function after wp() in the wp-blog-header.php file?
- How to execute a hook asynchronously?
- Issues with if, else, and elseif statements
- Is there a before_save_post hook or something similar
- wp query add array by if condition
- Modifying the wordpress login page and then referencing it with a shortcode problem
- “Seen by” Feature in posts [closed]
- How to hook in to the “output buffer” and add html content
- hook for loading page
- What hook to use to redirect based on $post
- How can I modify the header of RSS feed items?
- Print results of a WP_Query to wp-admin/upload.php within ‘delete_attachment’ hook?
- upgrader_process_complete filter not fired using ajax updates
- How to debug wordpress hooked functions?
- remove_action(‘save_post’) in function that was triggered by save post not working
- How to get template name or category before publish
- WordPress How to reorder Page/Post Settings
- Is there a way to Insert a post to post list?
- “Intercept” enqueing of 3rd party’s JS file
- WP hook to add custom content after the_title()
- Prefixing widget_posts_args Hook
- wp_get_current_user Not working
- Display custom debug info inside page and not before head
- calculate values from a field and insert them into custom fields when publishing or updating post
- How WordPress understands what do with the (all) key in the $wp_filter array? [duplicate]
- theme functions (hooks)
- frontend show edit profile with selected custom options
- How to change Akismet commenter privacy notice?
- How To Apply Different Styles To All Blocks Based on Post Meta Value?
- change position of element using hook [closed]
- The acction hook stop working if i move it from plugin file to theme’s functions.php file
- How to add action in wordpress custom plugin?
- How can I add new attributes in a Class when my addon is active?
- wp_footer content appearing in admin area
- Removing script tags that are loaded by other script tag
- Does wp_login hook fire on user registration?
- wp_trash_post not firing as expected (also applies to trashed_post)
- Hook on opening a media/document