title: WooCommerce Custom product type - Multiple add to cart sections issue
body: <p>I've created a custom product type in woocommerce called Booking. </p>
  
  <p>Here is the code that I have:</p>
  
  <pre><code>class WC_Product_Booking extends WC_Product{
      /**
       * __construct function.
       *
       * @access public
       * @param mixed $product
       */
      public function __construct( $product ) {
          $this-&gt;product_type = 'booking';
          $this-&gt;supports[]   = 'ajax_add_to_cart';
          parent::__construct( $product );
          add_action('woocommerce_booking_add_to_cart', array($this, 'add_to_cart'),30);
      }
  
      private function show_pricing_fields(){
        ?&gt;&lt;script type='text/javascript'&gt;
          jQuery( document ).ready( function() {
            jQuery( '.options_group.pricing' ).addClass( 'show_if_booking' ).show();
          });
        &lt;/script&gt;&lt;?php
      }
      /**
       * Display the add to cart button (same as for simple product)
       */
      public function add_to_cart() {
        wc_get_template( 'single-product/add-to-cart/simple.php' );
      }
  }
  </code></pre>
  
  <p>Right now the only problem is that the add to cart section on the product page is displayed 6 times andI cant figure out why. </p>
  
  <p>How can I solve this issue?</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p><strong>@Update … Solution</strong> <em>(as <a href="https://stackoverflow.com/users/3730754/loictheaztec">LoicTheAztec</a> put me on the right track)</em>:</p>
  
  <p>I've found a solution to this problem, using this code </p>
  
  <pre><code>if (! function_exists( 'woocommerce_booking_add_to_cart' ) ) {
  
    /**
    * Output the simple product add to cart area.
    *
    * @subpackage Product
    */
  
    function booking_add_to_cart() {
      wc_get_template( 'single-product/add-to-cart/simple.php' );
    }
  
    add_action('woocommerce_booking_add_to_cart',  'booking_add_to_cart');
  }
  </code></pre>
  
  <p>The crucial part is this action <strong><code>add_action('woocommerce_booking_add_to_cart',  'booking_add_to_cart');</code></strong></p>
  
  <p>Which puts the add to cart button once in the right place - to use it in your own custom product make an action called <strong><code>woocommerce_YOURPRODUCTTYPE_add_to_cart</code></strong> </p>