Created
June 18, 2024 09:42
-
-
Save Crocoblock/941fcd05da48f4b1b05bc56d11faea90 to your computer and use it in GitHub Desktop.
JetFormBuilder fix refer in ajax popup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'jet-form-builder/form-refer-url', function ( $refer ) { | |
if ( empty( $_POST['action'] ) || $_POST['action'] !== 'jet_popup_get_content' ) { | |
return $refer; | |
} | |
$url = $_POST['data']['page_url'] ?? ''; | |
if ( empty( $url ) ) { | |
return $refer; | |
} | |
return $url; | |
}, 999, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment