Check Subscribe by default in Registration

Home Forums WPLMS AddOns WPLMS Mailchimp Check Subscribe by default in Registration

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #79969
    planetacg
    Spectator
    Hello, is it possible to check by default the subscribe checkbox in registration?
    #80198
    H.K. Latiyan
    Participant
    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.
    #80203
    planetacg
    Spectator
    Thank you :) But now, there are two checkboxes (one of them checked and the other one unchecked).
    #80329
    H.K. Latiyan
    Participant
    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.  
    #80340
    planetacg
    Spectator
    Thank you once again :) :)
    #80522
    H.K. Latiyan
    Participant
    Thanks for confirming, so closing the topic.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Check Subscribe by default in Registration’ is closed to new replies.