-
-
Save KristaButler/23ceff41e87f03f7637631558c0e13b5 to your computer and use it in GitHub Desktop.
MemberPress WP Forms Phone Number Field Fix
This file contains 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 | |
function mepr_dequeue_wpforms_on_register_page() { | |
global $post; | |
$is_product_page = ( false !== ( $prd = \MeprProduct::is_product_page($post) ) ); | |
$is_account_page = \MeprUser::is_account_page($post); | |
if($is_product_page || $is_account_page) { | |
wp_deregister_script( 'wpforms-smart-phone-field' ); | |
wp_dequeue_script( 'wpforms-smart-phone-field' ); | |
} | |
} | |
add_action( 'wpforms_frontend_js', 'mepr_dequeue_wpforms_on_register_page', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment