WordPress.org

Forums

MailPoet WooCommerce Add-on
[resolved] Checkbox set to "checked" by default (5 posts)

  1. MisterShmi
    Member
    Posted 11 months ago #

    Is there a way to have the checkbox "checked" by default? I didn't see this option anywhere. Thanks!

    https://wordpress.org/plugins/mailpoet-woocommerce-add-on/

  2. MailPoet Staff
    Member
    Plugin Author

    Posted 9 months ago #

    Add this code to your footer.php file right below the call to wp_footer()

    <script>
    (function($){
    	$(document).ready(function(){
    
            $('#mailpoet_checkout_subscribe').prop('checked', true);
    
    	});
    })(window.jQuery);
    </script>
  3. mitmak
    Member
    Posted 7 months ago #

    Is there a way to have the checkbox "checked" by default on the CheckOut and New User Registration page using CSS only? Something like below?

    #mailpoet_checkout_subscribe {
    checked=true;
    }

  4. mitmak
    Member
    Posted 7 months ago #

    OR would any of the below work by adding to functions.php of the child theme?

    add_filter( 'mailpoet_woocommerce_subscribe_too', '__return_true' );
    add_filter( 'mailpoet_woocommerce_enable_checkout', '__return_true' );
    add_filter( 'mailpoet_checkout_subscribe', '__return_true' );

    Your inputs will be appreciated. Thanks much.

  5. derekakelly
    Member
    Posted 5 months ago #

    This should be a built in option!

Reply

You must log in to post.

About this Plugin

  • MailPoet WooCommerce Add-on
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.