Title: Conditional Form Display
Last modified: December 11, 2017

---

# Conditional Form Display

 *  Resolved [simon2902](https://wordpress.org/support/users/simon2902/)
 * (@simon2902)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/conditional-form-display-3/)
 * Hi
 * I use the plugin on my woocommerce checkout page. Users on my site also sign 
   on the checkout page via memberships. My question is: Once they are signed up
   on the site and purchase more products, is there a way to remove the newsletter
   form/check-mark from the checkout page? The current result is that every time
   a registered user returns to the checkout s/he will be asked again to subscribe
   to the newsletter. This should ideally only be happening on the condition that
   users are not logged in.
    Thanks Simon
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-form-display-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/conditional-form-display-3/#post-9770373)
 * Hi Simon,
 * You can accomplish this by adding the following PHP snippet to your theme its`
   functions.php` file (or by dropping it in a plugin).
 * This will hide the checkbox in the checkout form with CSS for every user that
   is logged-in.
 * [https://gist.github.com/dannyvankooten/ea79a68a191ccbe735a4b24bd53263fc](https://gist.github.com/dannyvankooten/ea79a68a191ccbe735a4b24bd53263fc)
 *     ```
       add_action( 'wp_head', function() {
       	if( ! is_user_logged_in() ) {
       	   return;
       	}
       	echo '<style>.mc4wp-checkbox-woocommerce{ display: none !important; }</style>';
       });
       ```
   
 * Cheers, Danny
 *  Thread Starter [simon2902](https://wordpress.org/support/users/simon2902/)
 * (@simon2902)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/conditional-form-display-3/#post-9772940)
 * Hi Danny
 * thanks a lot, that works great.
 * Best
    Simon

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conditional Form Display’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [simon2902](https://wordpress.org/support/users/simon2902/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/conditional-form-display-3/#post-9772940)
 * Status: resolved