Skip to content

Instantly share code, notes, and snippets.

@danieliser
Last active October 4, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieliser/a8998a38d84299d4aeba to your computer and use it in GitHub Desktop.
Save danieliser/a8998a38d84299d4aeba to your computer and use it in GitHub Desktop.
ReOpen popup 123 when form is submitted. This is needed when the form doesn't support ajax submission. The $_POST key & value will vary based on your form and will need to be replaced.
<?php
add_action( 'wp_footer', 'pum14_popup_reg_form_check', 1000 );
function pum14_popup_reg_form_check() {
if ( isset( $_POST['form_id'] ) && $_POST['form_id'] == 'my_form' ) {
?>
<script type="text/javascript">
PUM.open(123);
</script>
<?php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment