Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wpmudev-sls/5f1503e1e7edf8675f19c14aaa03aa9d to your computer and use it in GitHub Desktop.
Save wpmudev-sls/5f1503e1e7edf8675f19c14aaa03aa9d to your computer and use it in GitHub Desktop.
[Branda] - Load emails registration child sites for Forminator registration form
<?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