What the plugin you mention does is apply a filter to registration_errors, which is used by a function called register_new_user. The quickest and easiest solution would be to use that function instead of wp_insert_user.
If that isn’t possible or your code design doesn’t allow it, you can always call no_disposable_email directly, and before wp_insert_user.
$errors = new WP_Error();
$sanitized_user_login = 'login';
$user_email="[email protected]";
$check_disposable = no_disposable_email($errors, $sanitized_user_login, $user_email);
If (!is_wp_error($check_disposable)) {
// wp_insert_user
} else {
// whatever you need
}
Very bare-bones code sample, but should get you started.
Related Posts:
- How to have WordPress send a user confirmation/validation email on signup
- How can i force Display names to be the same as Usernames?
- How can a Firebase user registration and login be integrated into a WordPress site?
- How to get user-meta from Social Login registered users?
- How to create custom LOGIN and REGISTRATION forms?
- How to turn off email you receive when registered?
- Registration Form Validation in wordpress
- Will WordPress username displayed somewhere in the site?
- What plugin should I use for a basic user signup/login system [closed]
- How to display public user profile with 2 additional fields? (GitHub source code included)
- Upload files programmatically to users
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- action-scheduler vs wp-background-processing
- Displaying a Welcome Message to a Woocommerce User
- Average Account Age
- Form doesn’t submit on second submit call
- How to save additional user data as part of the registration process?
- WordPress Registration Email by Role
- Add a captcha form to the woocommerce register form
- WordPress Central User Database
- wp_set_auth_cookie causes 403 error in the wooCommerce checkout
- Create custom registration form for WordPress Multisite
- User registration
- WordPress Integration with Google Groups
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- Preventing My Plugin From Being Used For Free
- easy steps to make front end form without plugin
- How to create multiple users at once?
- Using WordPress to build membership Page
- The add_action(‘register_form’) isn’t effecting my registration form
- How to find the Registration page
- wp_logout_url($redirect); is not working in wordpress
- Best practices for user registration with WordPress from an MVC background
- Different registration form for different roles
- Structuring function with registration_errors hook
- How to automatically activate users after registration without activation email?
- Linking form to user meta fields
- Changing the Default New User Notification Email
- How to add Mobile field in Registration form using Theme my login Plugin
- Searchable Semi Random Number Generator on User Profiles
- Saving data only when payment is successful
- Create password protected page, no registration
- User / membership Plugin [closed]
- Overwrite user role
- Custom Widget not Available after Plugin Installation
- Users Ultra: Hide asterisk for required registration fields?
- How set role at registration based on email?
- Private WordPress blog, requires user registration approval, and allowing users to login with OpenID
- Plugin De/Activation Not Firing On MultiSite install
- What plugin(s) are best for this User registration task? [closed]
- Buddypress Plugin for register user from other site’s [closed]
- custom registration form [duplicate]
- I want to remove the register/login WordPress top bar from my website
- User register hook can’t access form request
- Creating a full business website
- Need a Plugin to create a registration form for my website? [closed]
- WordPress s2 member plugin not working [closed]
- WordPress isn’t sending welcome email with the password reset
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Issues with creating user profile for a subscriber, but with different profile page and functionalities
- What forum plugin can I use to allow non-registered users to create posts and comment? [closed]
- Beta Versioning of Plugins
- WooCommerce – Show shipping cost on product page [closed]
- Find out what is using PHP sessions in WordPress
- Override dynamic_sidebar() in plugin?
- Why is this custom taxonomy showing in the database?
- Where is the source code that makes the “all” array grabs filters in the $wp_filter?
- How can I change plugin to give access to editor user role?
- Embed a Google Sheet as you view it in a separate tab?
- Plugin version is not showing up in wordpress.org plugin directory
- Saving changes in wp_editor
- There is any way to remove post-format filter? [closed]
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- Retrieving Meta from Image Attachment
- Why this function not working for install database on plugin activation
- Banner not visible after plugin publishing
- Set WordPress Transient Expiration via Variable Value
- How can I use my custom wordpress theme on two websites? [closed]
- How (or where) do I get wordpress plugin update download link?
- Add custom PHP and HTML to the_content()
- Add an action based on custom post meta field
- How to hide an option from dropdown in filter module
- $wpdb not working wordpress plugin ajax call
- how to create user profile pages and display them based on users roles
- Woocommerce – Change variations output
- how do i fixe Page Builder on a custom page?
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- wp_enqueue_scrpts seems not to get called
- Adding featured image to post display widget
- How to Create Custom Dashboard for my Laundry Website?
- Warning: Illegal offset type in /var/www/html/wp-includes/option.php on line 1924
- How to create a WordPress sandbox on a live server for website development?
- get post excerpt by query
- Deleted plugins displays error message
- __FILE__ in WordPress plugins
- cmb2 select option output [closed]
- Woocommerce Product Add-ons – Auto-select first option
- Jquery post responses 500 error after some time and lastly an 503 error
- Identifying Plugins Based on Tables [closed]
- How to apply an additional fee for the layaway payment