Support » Plugin: WooCommerce MailChimp » Placement before terms and conditions

  • Hi. Thanks for sharing the plugin. I would like to request that an additional placement is added to the checkout area. There is a hook called woocommerce_checkout_before_terms_and_conditions, which adds the checkbox above the terms and conditions checkbox, which I think is a better place than below it.
    This would be a nice addition to the plugin. Hope it’s doable! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there
    Was thinking the exact same when I first needed this. Then I saw how long your thread has been here and thought I would create and share a solution for you.

    I made this piece of code which allows you to add additional hooks from your theme. Try it out and change it or add the hooks you need. Cheers.

    
    /**
     * Adds custom mailchimp hook for the woocommerce-mailchimp plugin.
     * Adds the 'woocommerce_after_order_notes' to the plugin settings.
     */
    add_filter('woocommerce_get_settings_mailchimp', 'woocommerce_mailchimp_theme_settings');
    function woocommerce_mailchimp_theme_settings( $settings ) {
    	$key = -1;
    	foreach ( $settings as $setting_group ) {
    		$key ++;
    		if ( empty($setting_group['id']) ) {
    			continue;
    		} elseif ( 'ss_wc_mailchimp_opt_in_checkbox_display_location' === $setting_group['id'] ) {
    			$settings[$key]['options']['woocommerce_after_order_notes'] = __( 'After order notes', 'theme_domain' );
    		}
    	}
    	return $settings;
    }

    Hi Mikkel.

    Thanks, that works great!

    You are welcome. Have a nice day! Hope this helps others.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Placement before terms and conditions’ is closed to new replies.