Hello, is it possible to check by default the subscribe checkbox in registration?
Add the bellow code in your wplms-customizer.php file, present in your wplms customizer plugin.
add_action('bp_init','custom_default_check_subscription_button');
function custom_default_check_subscription_button(){
if(class_exists('Wplms_Mailchimp_Init')){
$mailchimp = Wplms_Mailchimp_Init::init();
if(isset($mailchimp) && isset($mailchimp->settings) && isset($mailchimp->settings['enable_registration'])){
remove_action('bp_before_registration_submit_buttons', array($mailchimp,'display_subscribe_checkbox'),9,1);
}
}
}
add_action('bp_before_registration_submit_buttons',function(){echo '<div class="mailchimp_subscribe_checkbox" style="margin:15px 0;"><div class="checkbox">
<input type="checkbox" name="subscribe_mailchimp" id="subscribe_mailchimp" value="1" checked="checked" /> <label for="subscribe_mailchimp">'._x('Subscribe to our newsletter','Mailchimp subscribe checkbox in Buddypress registration form','wplms-cc').'</label>
</div></div>'; },9);
PS: Customization is not the part of theme support, please hire a freelancer or a developer for such customizations.
Thank you :)
But now, there are two checkboxes (one of them checked and the other one unchecked).
Apologies for the mistake in above code.
I have updated the above code now, please remove the previous code and add the new code instead.
Thank you once again :) :)
Thanks for confirming, so closing the topic.