Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Last active September 13, 2023 08:08
Show Gist options
  • Save xlplugins/15b49aacf3edeb87409c22caa5f1ef4c to your computer and use it in GitHub Desktop.
Save xlplugins/15b49aacf3edeb87409c22caa5f1ef4c to your computer and use it in GitHub Desktop.
This snippet will deque FB analytics js file and prevent any ajax requests on checkout page
/**
* This snippet will deque FB analytics js file and prevent any ajax requests on checkout page
*/
add_action( 'wp_enqueue_scripts', function () {
global $post;
if ( 0 < did_action( 'wfacp_checkout_page_found' ) && 'XXXXX' == $post->ID ) {
remove_action( 'wp_enqueue_scripts', array( WFFN_Core()->public, 'maybe_add_script' ) );
}
}, 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment