Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/47befa8bfee03f36e6a45e99a60419bd to your computer and use it in GitHub Desktop.
Save xlplugins/47befa8bfee03f36e6a45e99a60419bd to your computer and use it in GitHub Desktop.
disable_country_code_optin.php
class WFACP_Compatibility_CountryCodeFor_Elementor_Form_Telephone {
public function __construct() {
add_action( 'wp', [ $this, 'deque_script_optin' ] );
}
public function deque_script_optin() {
if ( ! WFOPP_Core()->optin_pages->is_wfop_page() ) {
return;
}
add_action( 'wp_enqueue_scripts', function () {
wp_deregister_script( 'ccfef-country-code-library-script' );
wp_deregister_script( 'ccfef-country-code-script' );
wp_deregister_style( 'ccfef-country-code-library-style' );
wp_deregister_style( 'ccfef-country-code-style' );
wp_dequeue_script( 'ccfef-country-code-library-script' );
wp_dequeue_script( 'ccfef-country-code-script' );
wp_dequeue_style( 'ccfef-country-code-library-style' );
wp_dequeue_style( 'ccfef-country-code-style' );
}, 9 );
}
}
new WFACP_Compatibility_CountryCodeFor_Elementor_Form_Telephone();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment