title: Uncaught Error: Call to a member function is_registration_enabled() on WooCommerce form-checkout.php
body: <p>I am making a plugin where I need checkout form. I am getting below error when I include <code>form-checkout.php</code> </p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to a member function is_registration_enabled() on null in C:\xampp7\htdocs\woo\wp-content\plugins\wooinstant\inc\templates\checkout\form-checkout.php:28 Stack trace: #0 C:\xampp7\htdocs\woo\wp-content\plugins\wooinstant\inc\wooinstant-layout.php(19): include() #1 C:\xampp7\htdocs\woo\wp-includes\class-wp-hook.php(286): wooinstant_layout('') #2 C:\xampp7\htdocs\woo\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 C:\xampp7\htdocs\woo\wp-includes\plugin.php(453): WP_Hook->do_action(Array) #4 C:\xampp7\htdocs\woo\wp-includes\general-template.php(2630): do_action('wp_footer') #5 C:\xampp7\htdocs\woo\wp-content\themes\twentyseventeen\footer.php(44): wp_footer() #6 C:\xampp7\htdocs\woo\wp-includes\template.php(688): require_once('C:\xampp7\htdoc...') #7 C:\xampp7\htdocs\woo\wp-includes\template.php(647): load_template('C:\xampp7\htdoc...', true) #8 C:\xampp7\htdocs\woo\wp-includes\general-template.php(76): locate_template(Array, true) #9 C:\xampp7\htdocs\woo\wp-con in C:\xampp7\htdocs\woo\wp-content\plugins\wooinstant\inc\templates\checkout\form-checkout.php on line 28</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/QYkFz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QYkFz.png" alt="Error"></a></p>
  
  <p>I want to include checkout form file like this </p>
  
  <pre><code>include plugin_dir_path( __FILE__ ) . '/templates/checkout/form-checkout.php';
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rh2lg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rh2lg.png" alt="enter image description here"></a></p>
  
  <p>I don't want to use <code>[woocommerce_checkout]</code> there.</p>