Knowledgebase
Maestrel > Help Desk > Knowledgebase

Browse our knowledgebase...




 
Knowledgebase » How to ... »

How to use MailChimp with HBook? May I have a MailChimp newsletter subscription checkbox in the form?

Answer

We currently don't have an integration with MailChimp within HBook. However, you can proceed as follows for adding a MailChimp newsletter subscription checkbox to the booking details form.

  1. Create MailChimp Basic Account
  2. Install MC4WP Basic Plugin : https://wordpress.org/plugins/mailchimp-for-wp/
  3. Enable the custom integration in the plugin as per instructions here https://www.mc4wp.com/kb/subscribe-mailchimp-custom-html-form/
  4. Use the "hb_policies_area_markup" HBook filter to add your custom code. Here is an example of the code you could add to your child theme's functions.php

function add_mailchimp_to_details_form( $output ) {
    $output .= '<h3 class="hb-title hb-title-terms">Our newsletter</h3>';
    $output .= '<p>';
    $output .= '<label>';
    $output .= '<input type="checkbox" name="mc4wp-subscribe" value="1" />';
    $output .= 'Yes! Subscribe me to your newsletter.</label>';
    $output .= '</p>';
    return $output;
}

add_filter( 'hb_policies_area_markup', 'add_mailchimp_to_details_form' );

Themes Booking Plugin Pricing Blog Contact