Last active
June 4, 2022 15:07
-
-
Save wpmudev-sls/5f1503e1e7edf8675f19c14aaa03aa9d to your computer and use it in GitHub Desktop.
[Branda] - Load emails registration child sites for Forminator registration form
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 | |
/** | |
* Plugin Name: [Branda] - Load emails registration child sites for Forminator registration form | |
* Plugin URI: https://wpmudev.com/ | |
* Description: Makes Forminator registration form to trigger Branda user sign up email on subsite | |
* Author: Glauber Silva @ WPMUDEV | |
* Author URI: https://wpmudev.com/ | |
* Jira Task: SLS-3639 | |
* License: GPLv2 or later | |
*/ | |
defined( 'ABSPATH' ) || exit; | |
/** | |
* ### !!!IMPORTANT!!! ### | |
* | |
* 1) Remember to access: | |
* Forminator > Your Form > User Registration > User Account Activation > Activation Method | |
* - And choose the "Email Activation" and set a confirmation page. | |
* | |
* 2) Remember to access: | |
* Forminator > Your Form > User Registration > User Account Activation > Activation Email | |
* - And choose the "None" option. | |
* | |
* 3) Remember to access: | |
* Forminator > Your Form > Email Notifications | |
* - And delete the email notifications for the registered user. | |
* | |
*/ | |
add_action( 'signup_user_meta', function( $meta ){ | |
if ( ! class_exists( 'Branda_Registration_Emails' ) && function_exists( 'branda_load_single_module' ) && is_multisite( ) && ! is_main_site() ) { | |
branda_load_single_module( 'emails/registration.php' ); | |
} | |
return $meta; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment